Next: haslabels() Up: MacAnova Help File Previous: graph_ticks   Contents


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

Keywords: transformations, descriptive statistics, ordering
halfnorm(x) computes the vector of approximate half normal scores for
the data in the REAL vector x.  This probably makes sense only when the
elements of x are all non-negative, although that is not required.

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

What is computed is equivalent to
   invnor(.5 + .5*(rank(abs(x),ties:"ignore") - .375)/(n + .25))
where n is the number of non-MISSING values.  The value corresponding to
a missing value is MISSING.

The most important use of halfnorm() is probably plot(halfnorm(ss),
sqrt(ss)), where ss is a vector of 1 degree of freedom sums of squares.
This produces a half normal plot of sqrt(ss).

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

halfnorm(x,ties:Method), where Method is "ignore", "average", or
"minimum" (or "i", "a", "m") computes invnor(.5 +
.5*(rank(abs(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 halfnorm().

If x is a matrix, the result is a matrix each of whose columns contains
the half normal scores for the corresponding column of x.

If x is an array, halfnorm(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 half normal scores 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, halfnorm(x) returns a structure
of the same form, each of whose non-structure components is the result
of applying halfnorm() to the corresponding component of x.

  Cmd> x <- vector(.59,8.82,9.46,3.34,3.49) # ranks are 1,4,5,2,3

  Cmd> halfnorm(x)
  (1)     0.14976      1.0162      1.5588     0.39821     0.67449

See also rankits().

Gary Oehlert 2003-01-15