Next: cumF() Up: MacAnova Help File Previous: cumchi()   Contents

cumdunnett()

Usage:
cumdunnett(x, ngroup, errorDf [,groupSizes][,onesided:T][,epsilon:eps]
  [,upper:T or lower:F]) x REAL, elements of ngroup integers >= 2,
  elements of errorDf >= 1, elements of groupsizes >= 0, eps > 0,
  default = .00001.



Keywords: probabilities, comparisons
cumdunnett(x, K, Df) computes the probability that Tmax <= x, Tmax =
max(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.  The value is 0
for any x <= 0.  For x >= 0, when K = 2 the value is the same as
2*cumstu(x,Df) - 1.  See cumstu().

cumdunnett(x, K, Df, upper:T) and cumdunnett(x, K, Df, lower:F) do the
same, except they compute the upper tail probability P(Tmax >= x).

cumdunnett(x, K, Df, onesided:T) computes the probability that Tmax<=x,
where Tmax is now the maximum of t21, t31, ..., tK1, not of their
absolute values.  When K = 2 the value is the same as cumstu(x,Df).
With 'upper:T' or 'lower:F' it computes the upper tail probability
P(Tmax >= x).

See below for computing probabilities when the sample sizes differ.

x, K and Df must be REAL.  The elements of K must be integers >= 2, and
the elements of Df must be >= 1, not necessarily integers.

Any of the arguments x, 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.

cumdunnett(x, K, Df [, onesided:T] [, upper:T or lower:F], epsilon:eps),
where eps is a small positive number (default .00001) which controls the
accuracy to which the probability is computed; the computed probability
should be no farther than eps from the true probability.

cumdunnett() is primarily used to compute P 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.

For a completely randomized design with k treatment groups of size n,
the P value is computed as cumdunnett(maxt, k, k*n - k, upper:T
[,onesided:T]).  See invdunnett() for computing critical values of the
Dunnett test.

Caution: cumdunnett() is very computation intensive and may be
unacceptably slow on an older computer.  On one Macintosh 68000 computer
with no math coprocessor, a single value took about 7 minutes to
compute.

Example:
  Cmd> cumdunnett(3.27, 5, 5*8 - 5, upper:T) # P(Tmax >= 3.27)
  (1)     0.00866

computes P(Tmax > 3.27) for a completely randomized design with 5
groups, all with sample size 8.

cumdunnett(x, K, Df, groupSizes [,onesided:T, epsilon:eps, upper:T or
lower:F]) computes probabilities for Tmax, with REAL argument groupSizes
specifying the sample sizes.

In the simplest usage, groupSizes is a vector (ndims(groupSizes) = 1),
with elements >= 0.  When 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 cumdunnett() 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), cumdunnett() uses up to k of the
non-zero leading values in the vector, where k is the corresponding
element of K.  When 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.

When 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> cumdunnett(3.27, 4, 12 - 4, vector(6,2,2,2), upper:T)
  (1)     0.03070

computes P(Tmax >= 3.27) for a completely randomized design with 4
groups and sample sizes 6, 2, 2 and 2.

  Cmd> cumdunnett(3.27, vector(3,4), vector(12 - 3, 12 - 4),\
       matrix(vector(6,3,3,0, 6,2,2,2),4)', upper:T)
  (1)     0.01825     0.03070

computes P(Tmax >= 3.27) 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> cumdunnett(3.27, 4, 12 - 4, 3)
  (1)     0.97182

computes the same result as cumdunnett(3.27, 4, 12 - 4), 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(1,2,3,3,3), vector(1,2,3), vector(1,2,3,0,0),
vector(2,4,6).

vector(1,2,3,0,3) and vector(1,2,3,0,0,1) would be errors because a
non-zero value follows a zero.

Caution: cumdunnett() is somewhat computation intensive.  On a slow
computer you may have to wait several seconds for a result.  Using a
somewhat larger value for epsilon, for example, epsilon:.0001, may speed
up the calculation at the cost of loss of accuracy.

See also invdunnett(), cumstudrng().


Gary Oehlert 2003-01-15