Examples for 'multcomp::litter'


Litter Weights Data Set

Aliases: litter

Keywords: datasets

### ** Examples


  ### 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.0319 *
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 in RET$pfunction("adjusted", ...): Completion with error > abseps

Warning in RET$pfunction("adjusted", ...): Completion with error > abseps

Warning in RET$pfunction("adjusted", ...): 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.032 *
50 - 0 >= 0     -2.2909     1.3384  -1.712  0.203  
500 - 0 >= 0    -2.6752     1.3343  -2.005  0.118  
50 - 5 >= 0      1.0615     1.3973   0.760  1.000  
500 - 5 >= 0     0.6772     1.3394   0.506  0.999  
500 - 50 >= 0   -0.3844     1.4510  -0.265  0.891  
otrend >= 0     -3.4821     2.0867  -1.669  0.218  
atrend >= 0   -314.7324   408.9901  -0.770  0.662  
ltrend >= 0     -1.9400     0.9616  -2.018  0.116  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Adjusted p values reported -- single-step method)

[Package multcomp version 1.4-19 Index]