> eartemp.mod1 <- manova(cbind(y1,y2,y3,y4) ~ trt) > summary(eartemp.mod1,test="Pillai") Df Pillai approx F num Df den Df Pr(>F) trt 2 1.0727 2.8923 8 20 0.02576 * Residuals 12 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > summary(eartemp.mod1,test="Wilks") Df Wilks approx F num Df den Df Pr(>F) trt 2 0.1257 4.0962 8 18 0.00619 ** Residuals 12 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > summary(eartemp.mod1,test="Hotelling-Lawley") Df Hotelling-Lawley approx F num Df den Df Pr(>F) trt 2 5.3767 5.3767 8 16 0.002115 ** Residuals 12 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > summary(eartemp.mod1,test="Roy") Df Roy approx F num Df den Df Pr(>F) trt 2 5.065 12.662 4 10 0.0006307 *** Residuals 12 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > rm(multi_y) > > > > trt <- rep(c("A","V","C"),each=20) > rabbit <- rep(seq(1:15),each=4) > time <- rep(seq(0,90,30),times=15) > > y <- c(-0.3,-0.2,1.2,3.1,-0.5,2.2,3.3,3.7,-1.1,2.4,2.2,2.7, + 1.0,1.7,2.1,2.5,-0.3,0.8,0.6,0.9, + -1.1,-2.2,0.2,0.3,-1.4,-0.2,-0.5,-0.1,-0.1,-0.1,-0.5,-0.3, + -0.2,0.1,-0.2,0.4,-0.1,-0.2,0.7,-0.3, + -1.8,0.2,0.1,0.6,-0.5,0.0,1.0,0.5,-1.0,-0.3,-2.1,0.6, + 0.4,0.4,-0.7,-0.3,-0.5,0.9,-0.4,-0.3) > > uni_y <- data.frame(trt,rabbit,time,y) > attach(uni_y) The following object(s) are masked _by_ '.GlobalEnv': rabbit, time, trt, y The following object(s) are masked from 'multi_y (position 3)': rabbit, trt The following object(s) are masked from 'uni_y (position 4)': rabbit, time, trt, y The following object(s) are masked from 'multi_y (position 5)': rabbit, trt The following object(s) are masked from 'multi_y (position 6)': trt The following object(s) are masked from 'multi_y (position 7)': trt > > trt <- factor(trt) > rabbit <- factor(rabbit) > time <- factor(time,ordered=T) > > eartemp.mod2 <- aov(y ~ trt + trt/rabbit + time + trt:time) > > summary(eartemp.mod2) Df Sum Sq Mean Sq F value Pr(>F) trt 2 35.377 17.6887 30.5871 1.728e-08 *** time 3 16.083 5.3611 9.2704 0.0001117 *** trt:rabbit 12 10.941 0.9117 1.5766 0.1428965 trt:time 6 10.063 1.6771 2.9000 0.0207002 * Residuals 36 20.819 0.5783 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > > eartemp.mod3 <- aov(y ~ trt*time + Error(rabbit)) > > summary(eartemp.mod3) Error: rabbit Df Sum Sq Mean Sq F value Pr(>F) trt 2 35.377 17.6887 19.401 0.0001737 *** Residuals 12 10.941 0.9118 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Error: Within Df Sum Sq Mean Sq F value Pr(>F) time 3 16.083 5.3611 9.2704 0.0001117 *** trt:time 6 10.063 1.6771 2.9000 0.0207002 * Residuals 36 20.819 0.5783 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > summary(eartemp.mod3,split=list(time=list(linear=1, quadratic=2, + cubic=3))) Error: rabbit Df Sum Sq Mean Sq F value Pr(>F) trt 2 35.377 17.6887 19.401 0.0001737 *** Residuals 12 10.941 0.9118 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Error: Within Df Sum Sq Mean Sq F value Pr(>F) time 3 16.0833 5.3611 9.2704 0.0001117 *** time: linear 1 14.5200 14.5200 25.1078 1.454e-05 *** time: quadratic 1 0.6000 0.6000 1.0375 0.3151972 time: cubic 1 0.9633 0.9633 1.6658 0.2050517 trt:time 6 10.0627 1.6771 2.9000 0.0207002 * trt:time: linear 2 7.8008 3.9004 6.7445 0.0032530 ** trt:time: quadratic 2 0.5560 0.2780 0.4807 0.6222535 trt:time: cubic 2 1.7059 0.8529 1.4749 0.2423023 Residuals 36 20.8190 0.5783 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > > >