asglht: Coerce object of class 'tukeytrend' to 'glht'

Description Usage Arguments Details Value Examples

View source: R/asglht.R

Description

Transfers output of functions tukeytrendfit and tukeytrendformula to glht.

Usage

1
asglht(object, df = "mean", ...)

Arguments

object

an object of class 'tukeytrend' as results from functions tukeytrendfit, or tukeytrendformula

df

defines whether and how/which degrees of freedom are passed to glht for the computation of multivariate quantile. Can be a single character string, that names a function ("mean", "min", ...) to summarize the individual models' degrees of freedom to a single degree of freedom, defaults to computing the mean df of all the input models. Setting df=NULL invokes that no degree of freedom is passed to glht, i.e. asymptotic inference by use of multivariate normal quantiles. You may also specify a single integer df in this argument, which is then passed to glht.

...

further arguments to be passed to glht, e.g. alternative

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)

tukeytrend documentation built on May 2, 2019, 5:11 a.m.