Next: rational() Up: MacAnova Help File Previous: rank()   Contents


rankits(x [,ties:"ignore" or "average" or "minimum"]), x REAL or a
  structure with REAL components.
rankits(n:N), integer N > 0

Keywords: transformations, descriptive statistics, ordering
rankits(x) computes the vector of rankits (normal scores) for data in
REAL vector x.

rankits(n:N), N a positive integer, is equivalent to rankits(run(N)).

An important use is plot(rankits(x),x) which produces a rankit or normal
scores plot of the values in x.  What is computed is equivalent to
            invnor((rank(x,ties:"ignore") - .375)/(n + .25))
where n is the number of non-MISSING values.  The value corresponding to

rankits(x [keywords]) has the same labels as x, if any.

rankits(x,ties:method), where method is "ignore", "average", or
"minimum" (or "i", "a", "m") computes
             invnor((rank(x,ties:method) - .375)/(n + .25))
See rank() for a detailed discussion of the three methods.  It is hard
to think of a situation when you would want to use "minimum" with

When x is a matrix, the result is a matrix each of whose columns
contains the rankits for the corresponding column of x.

When x is an array, rankits(x) is an array of the same size and shape
with all the elements with fixed values of subscripts 2, 3, ... defining
a "column" whose rankits are computed.  An array with dimension > 2 is
always treated as an array and not as a matrix, even if there are at
most two dimensions greater than 1.

It is also acceptable for x to be a structure, whose non-structure
components are all REAL.  In that case, rankits() returns a structure of
the same form, each of whose non-structure components is the result of
applying rankits() to the corresponding component of x.

  Cmd> x <- vector(10.59,18.82,19.46,13.34,13.49)#ranks are 1,4,5,2,3

  Cmd> rankits(x)
  (1)     -1.1798      0.4972      1.1798     -0.4972           0

See also halfnorm().

Gary Oehlert 2003-01-15