Next: ipf() Up: MacAnova Help File Previous: invstu()   Contents


invstudrng(P, ngroup, errorDf [,epsilon:eps] [,upper:T or lower:F]),
  elements of P between 0 and 1, elements of ngroup integers >= 2,
  elements of errorDf >= 1, eps > 0 small

Keywords: probabilities, comparisons, confidence intervals
invstudrng(P, K, Df) computes the quantiles (probability points,
critical values) of the Studentized range based on K normal variates and
an independent estimate of variance with Df degrees of freedom.  All
three arguments must be REAL.  The elements of P must be between 0 and
1. K must consist of integers >= 2, and the elements of Df must be >= 1,
not necessarily integers.

Any of the arguments P, K or Df that are not scalars must be vectors,
matrices or arrays all of the same size and shape.

invstudrng(P,2,Df) should be the same as sqrt(2)*invstu((1+P)/2,Df)
except for computational error.

invstudrng(P, K, Df, upper:T) and invstudrng(P, K, Df, lower:F) compute
upper tail quantiles.  The result is mathematically equivalent to
invstudrng(1 - P, K, Df).

Many so-called multiple comparison methods are based on these quantiles,
among them the Tukey HSD (Honestly Significant Difference) and the SNK
(Student-Newman-Keuls) methods.  For example, if you have K independent
normal samples of size n, all with the same variance, and Ssq is the
pooled estimate of the variance, you can compute the 5% HSD as

  Cmd> q05 <- invstudrng(.05,K,K*(n-1),upper:T);hsd <- q05*sqrt(Ssq/n)

In the same situation, you can test the null hypothesis that all means
are equal by the studentized range statistic computed as Q <-
(max(xbars) - min(xbars))/sqrt(Ssq/n).  This is an alternative to the
ANOVA F-statistic.  You can compute the alpha-level critical value for Q
as invstudrng(alpha, K,K*(n-1), upper:T).  Here xbars is a vector
containing the K sample means and Ssq is the pooled estimate of
variance.  See cumstudrng() for computing P values for Q.

invstudrng(P, K, Df, epsilon:eps [,upper:T]), where eps is a small
positive scalar, does the same computation with accuracy influenced by
eps.  The smaller the value of eps, the more accurate the result should
be, but the longer it will take to compute it.  The default value of eps
is 0.00001.

See also cumstudrng(), invstu().

Gary Oehlert 2003-01-15