invdunnett(P, ngroup, errorDf [,groupSizes][,onesided:T][,epsilon:eps] [,upper:T or lower:F]) P REAL with elements between 0 and 1, elements of ngroup integers >= 2, elements of errorDf >= 1, elements of groupsizes >= 0, eps > 0, default = .00001. |

invdunnett(P, K, Df) computes Pth quantile (probability point, critical value) of Tmax, where Tmax is the maximum of abs(t21), abs(t31), ..., abs(tK1), where t21, t31, ..., tK1 are K-1 t-statistics of the form tI1 = (xbarI-xbar1)/ stderr(xbarI-xbar1), I = 2,...,K. xbar1, xbar2, ..., xbarK are the means of independent normal random samples of the same size with identical population means and variances, and the standard errors are computed using an independent estimate of error variance with Df degrees of freedom. When K = 2 the value is the same as invstu((1+P)/2, Df). See invstu(). See below for computing quantiles when the sample sizes differ. P, K and Df must be REAL. The elements of P must be between 0 and 1. The elements of K must be 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 all be vectors, matrices or arrays of the same size and shape; the value has the same size and shape. invdunnett(P, K, Df, upper:T) and invdunnett(P, K, Df, lower:F) compute the upper tail quantile invdunnett(1-P, K, Df). invdunnett(P, K, Df, onesided:T [,upper:T]) computes the quantiles for Tmax, where Tmax is now the maximum of t21, t31, ..., tK1, not of their absolute values. When K = 2 the value is the same as invstu(P,Df [,upper:T]). invdunnett(P, K, Df [, onesided:T], epsilon:eps), where eps is a small positive number (default .00001) which controls the accuracy to which the quantile is computed. Specifically the logit of the probability corresponding to the computed quantile should be no farther than eps from the true logit of P (logit(P) = log(P) - log(1-P). Since invdunnett() uses the algorithm underlying cumdunnett() configured so as to compute probabilities to within .00001, eps should not be smaller than the default. invdunnett() is primarily used to compute critical values for a multiple comparisons procedure due to C. W. Dunnett wherein a control group (group 1) is compared to K-1 other treatment groups using K-1 t-tests. See cumdunnett() for computing P values for the Dunnett test. Example: Cmd> invdunnett(.05, 5, 5*8 - 5,upper:T) computes the two-sided critical value for the Dunnett test with significance level alpha = 0.05 for a completely randomized design with 5 groups, all with sample size 8. invdunnett(x, K, Df, groupSizes [,onesided:T] [,upper:T]) computes quantiles for Tmax, with REAL argument groupSizes specifying the sample sizes. In the simplest usage, groupSizes is a vector (ndims(groupSizes) = 1), with elements >= 0. If groupSizes is a matrix or array (ndims(groupSizes) > 1), it is treated as if it were a vector, matrix or array, with one less dimension, each of whose elements is a vector with length = last dimension of groupSizes. The first ndims(groupSizes) - 1 dimensions of groupSizes must match the dimensions of any of x, K, or DF which is not a scalar. In particular, a m by 1 matrix, which is treated as a vector of length m by most MacAnova functions, is interpreted by invdunnett() as a set of m vectors of length 1. In computing an element of the result based on a vector of group sizes (either all of groupSizes when it is a vector, or a row or "slice" of groupSizes when ndims(groupSizes) > 1), invdunnett() uses up to k of the non-zero leading values in the vector, where k is the corresponding element of K. If there are fewer than k non-zero values, the last one is replicated as many times as needed. It is an error to have a zero value followed by a nonzero value or to have all values zero. If there is only 1 non-zero value in a row or "slice" of groupSize, the replication of this element means the group sizes are assumed to be equal. In particular, this is the interpretation when groupSizes is a scalar or a m by 1 matrix. Examples: Cmd> invdunnett(.05, 4, 12 - 4, vector(6,2,2,2), upper:T) computes the 5% critical value for a completely randomized design with 4 groups and sample sizes 6, 2, 2 and 2. Cmd> invdunnett(.05, vector(3,4), vector(12 - 3, 12 - 4),\ matrix(vector(6,3,3,0, 6,2,2,2),4)', upper:T) computes 5% critical values for two completely randomized designs, one with 3 groups and sample sizes 6, 3, and 3, the other with 4 groups with sample sizes 6, 2, 2, and 2. Because trailing values in the rows of groupSizes are replicated, matrix(vector(6,3, 6,2),2)' would be an equivalent way to specify the group sizes. Cmd> invdunnett(.01, 4, 12 - 4, 3, upper:T) computes the same result as invdunnett(.01, 4, 12 - 4, upper:T), because groupSizes is a scalar. Only the ratios of non-zero elements of groupSizes are relevant. For example, for 5 groups (K=5), the following groupSizes are equivalent: vector(5,4,3,3,3), vector(5,4,3), vector(5,4,3,0,0), vector(10,8,6). vector(5,4,3,0,3) and vector(5,4,3,0,0,1) would be errors because a non-zero value follows a zero. Caution: invdunnett() is very computation intensive. If you do not have a fairly fast computer, it may be unacceptably slow. On one Macintosh 68000 computer with no math coprocessor, a single value took over 2300 seconds to compute. Until you know how long it will take on your computer, don't compute more than one value at a time. Using a somewhat larger value for epsilon, for example, epsilon:.0001 or epsilon:.0005, may speed up the calculation at the cost of some loss of accuracy. See also cumdunnett(), invstudrng().

Gary Oehlert 2003-01-15