simple.glht: Pairwise comparison with multiple testing compensation.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Extension of glht from the multcomp package to handle Fisher family-wise error and Bonferroni testing. Create a set of confidence intervals on the differences between the means of the levels of a factor with the specified family-wise probability of coverage. The intervals are based on the Studentized range statistic, Tukey's ‘Honest Significant Difference’ method, Fisher's family-wise error, or Bonferroni testing.

Usage

1
2
simple.glht(mod, effect, corr = c("Tukey","Bonferroni","Fisher"),
	level = 0.95, ...)

Arguments

mod

A fitted model object, usually an lm or glm fit.

effect

A character vector giving the term of the fitted model for which the intervals should be calculated. This can also be an interaction.

corr

A character vector giving the multiple testing correction method. Defaults to Tukey.

level

A numeric value between zero and one giving the family-wise confidence level to use.

...

Optional additional arguments. None are used at present.

Details

When comparing the means for the levels of a factor in an analysis of variance, a simple comparison using t-tests will inflate the probability of declaring a significant difference when it is not in fact present. This because the intervals are calculated with a given coverage probability for each interval but the interpretation of the coverage is usually with respect to the entire family of intervals.

John Tukey introduced intervals based on the range of the sample means rather than the individual differences. The intervals returned by this function are based on this Studentized range statistics.

The intervals constructed in this way would only apply exactly to balanced designs where there are the same number of observations made at each level of the factor. This function incorporates an adjustment for sample size that produces sensible intervals for mildly unbalanced designs.

If which specifies non-factor terms these will be dropped with a warning: if no terms are left this is a an error.

Value

An object of classes "simple.glht", "summary.glht" and "glht" containing information to produce confidence intervals, tests and plotting.

There are print, plot and cld methods for class "simple.glht". The plot method does not accept xlab, ylab or main arguments and creates its own values for each plot.

Author(s)

Douglas Bates

References

Miller, R. G. (1981) Simultaneous Statistical Inference. Springer.

Yandell, B. S. (1997) Practical Data Analysis for Designed Experiments. Chapman & Hall.

See Also

aov, qtukey, model.tables, glht in package multcomp.

Examples

1
2
3
4
5
6
require(graphics)

summary(fm1 <- lm(breaks ~ wool + tension, data = warpbreaks))
simple.glht(fm1, "tension")
plot(simple.glht(fm1, "tension"))
cld(simple.glht(fm1, "tension"))

Example output

Attaching package: 'mixlm'

The following objects are masked from 'package:stats':

    glm, lm


Call:
lm(formula = breaks ~ wool + tension, data = warpbreaks)

Residuals:
    Min      1Q  Median      3Q     Max 
-19.500  -8.083  -2.139   6.472  30.722 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   28.148      1.581  17.805  < 2e-16 ***
wool(A)        2.889      1.581   1.827 0.073614 .  
tension(L)     8.241      2.236   3.686 0.000561 ***
tension(M)    -1.759      2.236  -0.787 0.435062    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

s: 11.62 on 50 degrees of freedom
Multiple R-squared: 0.2691,
Adjusted R-squared: 0.2253 
F-statistic: 6.138 on 3 and 50 DF,  p-value: 0.00123 


	 Simultaneous Confidence Intervals and Tests for General Linear Hypotheses

Multiple Comparisons of Means: Tukey Contrasts


Fit: lm(formula = breaks ~ wool + tension, data = warpbreaks)

Quantile = 2.4154 
Minimum significant difference = 9.3534
95% confidence level
 
Linear Hypotheses:
      Lower  Center   Upper Std.Err t value   P(>t)   
L-M  0.6466 10.0000 19.3534  3.8724   2.582 0.03363 * 
L-H  5.3688 14.7222 24.0756  3.8724   3.802 0.00112 **
M-H -4.6312  4.7222 14.0756  3.8724   1.219 0.44742   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Adjusted p values reported -- single-step method)

Tukey's HSD
Alpha: 0.05

      Mean G1 G2
L 36.38889  A   
M 26.38889     B
H 21.66667     B

mixlm documentation built on May 2, 2019, 6:08 p.m.

Related to simple.glht in mixlm...