| asglht {tukeytrend} | R Documentation |
Coerce object of class 'tukeytrend' to 'glht'
Description
Transfers output of functions tukeytrendfit and tukeytrendformula to glht.
Usage
asglht(object, df = "mean", ...)
Arguments
object |
an object of class 'tukeytrend' as results from functions |
df |
defines whether and how/which degrees of freedom are passed to |
... |
further arguments to be passed to |
Details
Passes the elements $mmm from tukeytrend output to glht, argument model, and $mlf to argument linfct, computes summary statistics for the vector of degrees of freedom in tukeytrend and passes it to glht, argument df. All other arguments are passed via ... to glht; be aware that mis-spelled arguments may be lost in glht.
Value
An object of class glht.
Examples
data(litter, package="multcomp")
dl <- litter
dl$dosen <- as.numeric(as.character(dl$dose))
fit <- lm(weight ~ dosen + number, data=dl)
ttlitter <- tukeytrendfit(fit, dose="dosen",
scaling=c("ari", "ord", "log"))
# instead of transferring individual elements from the
# tukeytrend output into the arguments of glht , ...
# comp1 <- glht(model=ttlitter$mmm, linfct=ttlitter$mlf,
# df=round(mean(ttlitter$df)), alternative="less")
# summary(comp1)
# ... you can just use:
comp2 <- asglht(ttlitter, alternative="less")
summary(comp2)