simint {multcomp} | R Documentation |
Computes simultaneous intervals for several multiple procedures.
## Default S3 method: simint(y, x=NULL, type=c("Dunnett", "Tukey", "Sequen", "AVE", "Changepoint", "Williams", "Marcus", "McDermott","Tetrade"), cmatrix=NULL, conf.level=0.95, alternative=c("two.sided","less", "greater"), asympt=FALSE, eps=0.001, maxpts=1e+06, nlevel=NULL, nzerocol=c(0,0),...) ## S3 method for class 'formula': simint(formula, data=list(), subset, na.action, whichf, ...) ## S3 method for class 'lm': simint(y, psubset=NULL, conf.level=0.95, cmatrix = NULL, alternative=c("two.sided","less", "greater"), asympt=FALSE, eps=0.001, maxpts=1e+06, ...)
y |
a numeric vector of responses or an object of class
lm or glm . |
x |
a numeric matrix, the design matrix. |
type |
the type of contrast to be used. |
cmatrix |
the contrast matrix itself can be specified. If
cmatrix is defined, type is ignored. |
conf.level |
confidence level. |
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. |
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" . |
nzerocol |
a vector of two elements defining the number of
zero-columns to add to the contrast matrix from left (the first element,
usually 1 for the intercept) and right (usually 0 if no covariables are
specified). nzerocol is automatically determined by
simint.formula . |
psubset |
a vector of integers or characters indicating for which
subset of coefficients of a (generalized) linear model
y simultaneous confidences intervals should be
computed. |
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") . |
whichf |
if more than one factor is given in the right hand side of
formula , whichf can be used to defined the factor to compute
contrasts of. |
... |
further arguments to be passed to or from methods. |
Computes simultaneous confidence intervals for several multiple comparisons.
The
implemented algorithms take the stochastical correlations between the test statistics
into account. Only single step comparisons are performed. 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 confidence intervals are not associated with the p-values from
simtest
.
See simtest
for detailed information on the formula interface.
an object of class hmtest
Frank Bretz <bretz@ifgb.uni-hannover.de> and
Torsten Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de>
Frank Bretz, Alan Genz and Ludwig A. Hothorn (2001), On the numerical availability of multiple comparison procedures. Biometrical Journal, 43(5), 645–656.
TukeyHSD
for the special case of Tukey contrasts.
data(recovery) # one-sided simultaneous confidence intervals for Dunnett # in the one-way layout summary(simint(minutes~blanket, data=recovery, type="Dunnett", conf.level=0.9, alternative="less",eps=0.0001)) # alternatively via a prespecified linear model lmmod <- lm(minutes ~ blanket, data=recovery, contrasts=list(blanket = "contr.Dunnett")) summary(simint(lmmod, psubset=2:4, conf.level=0.9, alternative="less",eps=0.0001)) # Tukey confidence intervals, compare with TukeyHSD data(warpbreaks) fm1 <- aov(breaks ~ wool + tension, data = warpbreaks) tHSD <- TukeyHSD(fm1, "tension", ordered = FALSE) print(tHSD) mcHSD <- simint(breaks ~ wool + tension, data = warpbreaks, whichf="tension", type="Tukey") print(mcHSD) plot(mcHSD)