| tukeytrendfit {tukeytrend} | R Documentation |
Fit multiple marginal models by updating a given fitted model object with re-scaled dose variable.
Description
Wrapper function to re-fit a given model after different rescalings of a single dose variable. The refitted models are combined into a list that is suitable as input to the multiple marginal model function of package multcomp, mmm.
Usage
tukeytrendfit(fit, dose,
scaling = c("ari", "ord", "log", "arilog", "highvslow", "treat"),
ctype = NULL, ddf = c("residual", "KR", "PB"), d0shift = 1)
Arguments
fit |
A fitted model object, currently, the classes |
dose |
A single character string, naming a numeric variable in the models formula. This variable is rescaled acc. to the options in |
scaling |
A vector of character strings, naming the options for rescaling the variable specified in |
ctype |
optional character string naming a contrast type for multiple comparisons between dose levels, when |
ddf |
single character string, defining the option for the degree of freedom in inference after model fitting. By default, |
d0shift |
an optional factor, that is multiplied with the interpolated dose score for |
Value
A list with elements
mmm |
a list of fitted models, after rescaling the |
mlf |
a list of matrices defining a linear functions of model parameters for each model in |
df |
a vector of degrees of freedom, one for each model in |
and information of the model typ and call of the initial model
Author(s)
Frank Schaarschmidt and Christian Ritz (providing internal functions to interface objects of class "lmerMod" and "lme")
References
Tukey JW, Ciminera JL, Heyse JF (1985). Testing the statistical certainty of a response to increasing doses of a drug. Biometrics 41(1), 295-301.
Pipper CB, Ritz C, Bisgaard H (2012). A versatile methode for confirmatory evaluation of the effects of a covariate in multiple models. JRSSC - Applied Statistics 61, 315-326.
See Also
Functions glht and mmm in package multcomp;
tukeytrendformula for starting with a model formula and data.frame;
combtt for concatenating several objects resulting from this function, e.g. for multiple endpoints or with different covariates;
asglht for direct conversion to a glht-object
Examples
data(litter, package="multcomp")
# variable of interest is 'dose', but
# we may want to include 'number' as a covariate
dl <- litter
dl$dosen <- as.numeric(as.character(dl$dose))
fit <- lm(weight ~ dosen + number, data=dl)
# as it is unclear on which scale of dosage,
# dose-response-shape is met best, we may try different
# re-scalings of the dose variable, including Dunnett- type multiple contrast test
ttlitter <- tukeytrendfit(fit, dose="dosen",
scaling=c("ari", "ord", "log", "treat"), ctype="Dunnett")
summary(asglht(ttlitter))