litter.RdDose response of litter weights in rats.
data("litter")This data frame contains the following variables
dosages at four levels: 0, 5, 50,
500.
gestation time as covariate.
number of animals in litter as covariate.
response variable: average post-birth weights in the entire litter.
Pregnant mice were divided into four groups and the compound in four different doses was administered during pregnancy. Their litters were evaluated for birth weights.
P. H. Westfall, R. D. Tobias, D. Rom, R. D. Wolfinger, Y. Hochberg (1999). Multiple Comparisons and Multiple Tests Using the SAS System. Cary, NC: SAS Institute Inc., page 109.
P. H. Westfall (1997). Multiple Testing of General Contrasts Using Logical Constraints and Correlations. Journal of the American Statistical Association, 92(437), 299–306.
### fit ANCOVA model to data
amod <- aov(weight ~ dose + gesttime + number, data = litter)
### define matrix of linear hypotheses for `dose'
doselev <- as.integer(levels(litter$dose))
K <- rbind(contrMat(table(litter$dose), "Tukey"),
otrend = c(-1.5, -0.5, 0.5, 1.5),
atrend = doselev - mean(doselev),
ltrend = log(1:4) - mean(log(1:4)))
### set up multiple comparison object
Kht <- glht(amod, linfct = mcp(dose = K), alternative = "less")
### cf. Westfall (1997, Table 2)
summary(Kht, test = univariate())
#>
#> Simultaneous Tests for General Linear Hypotheses
#>
#> Multiple Comparisons of Means: User-defined Contrasts
#>
#>
#> Fit: aov(formula = weight ~ dose + gesttime + number, data = litter)
#>
#> Linear Hypotheses:
#> Estimate Std. Error t value Pr(<t)
#> 5 - 0 >= 0 -3.3524 1.2908 -2.597 0.00575 **
#> 50 - 0 >= 0 -2.2909 1.3384 -1.712 0.04576 *
#> 500 - 0 >= 0 -2.6752 1.3343 -2.005 0.02448 *
#> 50 - 5 >= 0 1.0615 1.3973 0.760 0.77498
#> 500 - 5 >= 0 0.6772 1.3394 0.506 0.69260
#> 500 - 50 >= 0 -0.3844 1.4510 -0.265 0.39595
#> otrend >= 0 -3.4821 2.0867 -1.669 0.04988 *
#> atrend >= 0 -314.7324 408.9901 -0.770 0.22212
#> ltrend >= 0 -1.9400 0.9616 -2.018 0.02379 *
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> (Univariate p values reported)
#>
summary(Kht, test = adjusted("bonferroni"))
#>
#> Simultaneous Tests for General Linear Hypotheses
#>
#> Multiple Comparisons of Means: User-defined Contrasts
#>
#>
#> Fit: aov(formula = weight ~ dose + gesttime + number, data = litter)
#>
#> Linear Hypotheses:
#> Estimate Std. Error t value Pr(<t)
#> 5 - 0 >= 0 -3.3524 1.2908 -2.597 0.0518 .
#> 50 - 0 >= 0 -2.2909 1.3384 -1.712 0.4118
#> 500 - 0 >= 0 -2.6752 1.3343 -2.005 0.2203
#> 50 - 5 >= 0 1.0615 1.3973 0.760 1.0000
#> 500 - 5 >= 0 0.6772 1.3394 0.506 1.0000
#> 500 - 50 >= 0 -0.3844 1.4510 -0.265 1.0000
#> otrend >= 0 -3.4821 2.0867 -1.669 0.4490
#> atrend >= 0 -314.7324 408.9901 -0.770 1.0000
#> ltrend >= 0 -1.9400 0.9616 -2.018 0.2141
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> (Adjusted p values reported -- bonferroni method)
#>
summary(Kht, test = adjusted("Shaffer"))
#>
#> Simultaneous Tests for General Linear Hypotheses
#>
#> Multiple Comparisons of Means: User-defined Contrasts
#>
#>
#> Fit: aov(formula = weight ~ dose + gesttime + number, data = litter)
#>
#> Linear Hypotheses:
#> Estimate Std. Error t value Pr(<t)
#> 5 - 0 >= 0 -3.3524 1.2908 -2.597 0.0518 .
#> 50 - 0 >= 0 -2.2909 1.3384 -1.712 0.0915 .
#> 500 - 0 >= 0 -2.6752 1.3343 -2.005 0.0734 .
#> 50 - 5 >= 0 1.0615 1.3973 0.760 1.0000
#> 500 - 5 >= 0 0.6772 1.3394 0.506 1.0000
#> 500 - 50 >= 0 -0.3844 1.4510 -0.265 1.0000
#> otrend >= 0 -3.4821 2.0867 -1.669 0.0998 .
#> atrend >= 0 -314.7324 408.9901 -0.770 0.4442
#> ltrend >= 0 -1.9400 0.9616 -2.018 0.0518 .
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> (Adjusted p values reported -- Shaffer method)
#>
summary(Kht, test = adjusted("Westfall"))
#>
#> Simultaneous Tests for General Linear Hypotheses
#>
#> Multiple Comparisons of Means: User-defined Contrasts
#>
#>
#> Fit: aov(formula = weight ~ dose + gesttime + number, data = litter)
#>
#> Linear Hypotheses:
#> Estimate Std. Error t value Pr(<t)
#> 5 - 0 >= 0 -3.3524 1.2908 -2.597 0.0318 *
#> 50 - 0 >= 0 -2.2909 1.3384 -1.712 0.0893 .
#> 500 - 0 >= 0 -2.6752 1.3343 -2.005 0.0644 .
#> 50 - 5 >= 0 1.0615 1.3973 0.760 0.7750
#> 500 - 5 >= 0 0.6772 1.3394 0.506 0.7271
#> 500 - 50 >= 0 -0.3844 1.4510 -0.265 0.7271
#> otrend >= 0 -3.4821 2.0867 -1.669 0.0917 .
#> atrend >= 0 -314.7324 408.9901 -0.770 0.3951
#> ltrend >= 0 -1.9400 0.9616 -2.018 0.0459 *
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> (Adjusted p values reported -- Westfall method)
#>
summary(Kht, test = adjusted("single-step"))
#> Warning: Completion with error > abseps
#> Warning: Completion with error > abseps
#> Warning: Completion with error > abseps
#>
#> Simultaneous Tests for General Linear Hypotheses
#>
#> Multiple Comparisons of Means: User-defined Contrasts
#>
#>
#> Fit: aov(formula = weight ~ dose + gesttime + number, data = litter)
#>
#> Linear Hypotheses:
#> Estimate Std. Error t value Pr(<t)
#> 5 - 0 >= 0 -3.3524 1.2908 -2.597 0.0321 *
#> 50 - 0 >= 0 -2.2909 1.3384 -1.712 0.2037
#> 500 - 0 >= 0 -2.6752 1.3343 -2.005 0.1183
#> 50 - 5 >= 0 1.0615 1.3973 0.760 0.9999
#> 500 - 5 >= 0 0.6772 1.3394 0.506 0.9987
#> 500 - 50 >= 0 -0.3844 1.4510 -0.265 0.8907
#> otrend >= 0 -3.4821 2.0867 -1.669 0.2178
#> atrend >= 0 -314.7324 408.9901 -0.770 0.6621
#> ltrend >= 0 -1.9400 0.9616 -2.018 0.1155
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> (Adjusted p values reported -- single-step method)
#>