Learn R Programming

multcomp (version 0.2-6)

simtest: Simultaneous Comparisons

Description

Computes multiplicity adjusted p-value for several multiple comparisons.

Usage

## S3 method for class 'default':
simtest(y, x=NULL, type=c("Dunnett", "Tukey",
        "Sequen", "AVE", "Changepoint", "Williams", "Marcus",
        "McDermott","Tetrade"), cmatrix=NULL,
        alternative=c("two.sided","less", "greater"),
        asympt=FALSE, ttype=c("free","logical"), eps=.,
        maxpts=, nlevel=NULL, ...)
## S3 method for class 'formula':
simtest(formula, data=list(), subset, na.action, ...)

Arguments

y
a numeric vector of responses.
x
a numeric matrix, the design matrix.
type
the type of contrast to be used. If type is not specified, cmatrix has to be specified.
cmatrix
the contrast matrix itself can be specified. If cmatrix is defined, type is ignored.
alternative
the alternative hypothesis must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.
asympt
a logical indicating whether the (exact) t-distribution or the normal approximation should be used.
ttype
Specifies whether the logical contraint method of Westfall (997) will be used, or whether the uncontrained method will be used.
eps
absolute error tolerance as double.
maxpts
maximum number of function values as integer.
nlevel
a vector containing the number of levels for each factor for type == "Tetrade".
formula
a symbolic description of the model to be fit.
data
an optional data frame containing the variables in the model. By default the variables are taken from Environment(formula), typically the environment from which simint is called.
subset
an optional vector specifying a subset of observations to be used.
na.action
a function which indicates what should happen when the data contain NA's. Defaults to GetOption("na.action").
...
further arguments to be passed to or from methods.

Value

  • an object of class hmtestp

Details

Computes multiplicity adjusted p-value for several multiple comparisons. The implemented algorithms take the logical relationships between the hypotheses and the stochastical correlations between the test statistics into account. Logical information is included via the methods described by Westfall (997). Stochastic information is included via the pmvt function. The p-values are generally the same as the come out in a closed test procedure using max-T-type statistics. The procedure differs in a very subtle way from closed testing, but still controls FWE strongly under point null configurations; see Westfall (997). The present function allows for multiple comparisons of generally correlated means in general linear models under the classical ANOVA assumptions, as well as more general approximate procedures for approximately normal and generally correlated parameter estimates. Either multivariate normal or multivariate t statistics can be used. The interface allows the use of the multiple comparison procedures as for example Dunnett and Tukey. The resulting p-values are not associated with the confidence intervals from simint.

References

Peter Westfall (997), Multiple testing of general contrasts using logical constraints and correlations. Journal of the American Statistical Association 92(437), 299-36

Frank Bretz, Alan Genz and Ludwig A. Hothorn (2), On the numerical availability of multiple comparison procedures. Biometrical Journal, 43(), 64--66.

Examples

Run this code
data(cholesterol)

# adjusted p-values for all-pairwise comparisons in a onw-way 
# layout (tests for restricted combinations)
simtest(response ~ trt, data=cholesterol, type="Tukey", ttype="logical")

Run the code above in your browser using DataLab