a model object that inherits from class
"lm", typically this is created
by a call to
lm or
aov.
OPTIONAL ARGUMENTS:
focus
the name of a factor in the
lm model upon whose levels linear
combinations will be computed;
focus,
adjust,
and/or
comparisons together specify the linear combinations.
If
focus,
adjust and
lmat are all
NULL,
the first factor in the specified model (if any)
will be used as the
focus factor.
adjust
a list of other factors and/or covariates in the model,
and specified adjustment values for these.
If
NULL, the adjustment values will be the average over
the levels of every (non-
focus) factor in the model,
and the grand average values of numeric covariates.
Several combinations of values may be specified for each factor/covariate;
adjusted means for the
focus factor will be computed for every
combination of values specified in the
adjust list.
lmat
a matrix of coefficients specifying linear combinations.
Each column of
lmat specifies a linear combination to be estimated
under the "textbook parametrization" of the linear model
(see the details section in the
multicomp help file).
Warning: factor levels are ordered alphabetically within factors.
Specifying
lmat directly will override the
focus and
adjust arguments.
comparisons
a keyword specifying standard differences of the adjusted means
specified by
focus or
adjust,
or of the linear combinations specified by the columns of
lmat.
Available keywords at this time are
the default
"mca" for all pairwise differences of adjusted means;
"mcc" for pairwise differences between a single adjusted mean of the
focus factor or
lmat column (the control) and the others;
or
"none", if the adjusted means or
lmat columns themselves
are of interest without further differencing.
Any other value for comparisons will have the same
effect as
"none".
If several adjustment combinations are specified by the
adjust list,
the differences specified by
comparisons
will be applied within each of these combinations.
conf.level
the desired joint confidence level (
error.type="fwe")
or comparison-wise confidence level (
error.type="cwe").
bounds
a character string specifying the type of intervals to compute:
bounds="both", the default, specifies two-sided intervals;
bounds="lower" gives intervals with
Inf for upper bounds
(but sharper lower bounds than
"both");
bounds="upper" will have an analogous effect.
Mixed bounds can be achieved by specifying (e.g.)
bounds="upper" and then providing in
lmat the negative versions of
combinations for which lower bounds are desired.
error.type
a character string specifying the type of error rate:
error.type="fwe", the default, specifies family-wise error rate
protection, so that the probability that all bounds hold is at least
conf.level.
error.type="cwe" specifies comparison-wise error rate protection,
i.e. the probability that any one preselected bound holds is
conf.level.
method
a character string that specifies the desired method for
critical point calculation.
The default is
"best.fast".
Available methods at this time are:
"lsd",
"tukey",
"dunnett",
"sidak",
"bon",
"scheffe""sim",
"best.fast",
"best".
See the
multicomp help file for descriptions of the methods.
crit.point
if none of the above methods suits the user, a value for the critical
point used in the intervals/bounds may be specified directly using
crit.point.
In this case, ensuring validity of the critical point is
the user's responsibility.
Method is changed to
"user-specified",
and
alpha and
error.type are merely labels in the output object,
and may have no meaning.
control
when
comparisons="mcc", this number specifies which column of the
lmat
matrix is to be treated as the control.
The default is the last column of
lmat.
simsize
optional specification of simulation size for the
"sim" method.
The default choice provides intervals or bounds whose actual family-wise
error rate is within 10% of the nominal
1 - conf.level
(with probability .99).
This amounts to simulation sizes in the tens of thousands for most cases.
plot
a logical value, if
TRUE,
a plot of the calculated intervals will be created
on the current graphics device.
Alternately, the output object can be used as an argument
to the generic function
plot.
valid.check
a logical value, if
TRUE, the default, validity of the specified critical
point calculation method for the desired comparisons will be checked.
If the condition for validity fails, the function will terminate with a
message.
est.check
a logical value, if
TRUE,
estimability of the desired linear combinations will be checked.
If the condition fails, the function will terminate with a message.
Setting this to
FALSE will disable the checking.
Note that in certain cases,
too much rounding of coefficients in a specified
lmat can
cause the estimability condition to fail.
print.p
a logical value; if
TRUE, the results are printed,
(by a call to
print.multicomp).
Srank
Used when the method is
"scheffe". If the rank of the covariance matrix
of the estimators of the linear combinations of interest is
Srank, the
critical point will be
sqrt(Srank*qf(1-alpha, Srank, df.residual)).
call.new.graphsheet
a logical value; if
TRUE, the
new.graphsheet function will be called
before any plots are produced.
VALUE:
invisibly returns an object of class
multicomp.
See the
multicomp help for its components.
SIDE EFFECTS:
A table of confidence bounds will be printed if
print.p is
TRUE.
A plot of the confidence bounds will be drawn if requested.