tukeytrendformula {tukeytrend} | R Documentation |
Fit multiple marginal models with differently re-scaled dose variable.
Description
Wrapper function to fit a given model after different rescalings of a single dose variable. The fitted models are combined into a list that is suitable as input to the multiple marginal model function of package multcomp, mmm.
Usage
tukeytrendformula(formula, data, model = "lm", dose,
scaling = c("ari", "ord", "log", "arilog", "treat", "treatHL"),
ctype = NULL, ddf = c("residual", "KR", "PB"), d0shift = 1, ...)
Arguments
formula |
formula object suitable for the model function specified in |
data |
data.frame containing the variables of interest |
model |
character string, naming the function for model fitting, currently |
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 |
... |
arguments passed to the model fitting function named in |
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 type 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.
Examples
data(litter, package="multcomp")
# compare
dl <- litter
dl$dosen <- as.numeric(as.character(dl$dose))
ttlitter <- tukeytrendformula(weight ~ dosen + number, data=dl, model="lm", dose="dosen",
scaling=c("ari", "ord", "log", "treat"), ctype="Dunnett")
summary(asglht(ttlitter))