> summary(glucose.mod1) Df Sum Sq Mean Sq F value Pr(>F) day 2 13.763 6.8817 6.0015 0.01561 * day:run 3 16.357 5.4522 4.7548 0.02079 * Residuals 12 13.760 1.1467 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > glucose.mod2 <- aov(glucose ~ day + Error(run)) > > summary(glucose.mod2) Error: run Df Sum Sq Mean Sq F value Pr(>F) day 2 13.763 6.8817 1.2622 0.4002 Residuals 3 16.357 5.4522 Error: Within Df Sum Sq Mean Sq F value Pr(>F) Residuals 12 13.76 1.1467 > > library(nlme) > glucose.mod3 <- lme(fixed=glucose~1,random=~1|day/run) > > summary(glucose.mod3) Linear mixed-effects model fit by REML Data: NULL AIC BIC logLik 69.72238 73.05524 -30.86119 Random effects: Formula: ~1 | day (Intercept) StdDev: 0.4880991 Formula: ~1 | run %in% day (Intercept) Residual StdDev: 1.197992 1.070825 Fixed effects: glucose ~ 1 Value Std.Error DF t-value p-value (Intercept) 42.76667 0.6183161 12 69.16635 0 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -1.1445869330 -0.4923897541 -0.0005667705 0.1535668202 2.8710076726 Number of Observations: 18 Number of Groups: day run %in% day 3 6 > intervals(glucose.mod3) Approximate 95% confidence intervals Fixed effects: lower est. upper (Intercept) 41.41947 42.76667 44.11386 attr(,"label") [1] "Fixed effects:" Random Effects: Level: day lower est. upper sd((Intercept)) 0.001739456 0.4880991 136.9628 Level: run lower est. upper sd((Intercept)) 0.4308289 1.197992 3.331219 Within-group standard error: lower est. upper 0.7179214 1.0708252 1.5972036 > > > library(lme4) > glucose.mod4 <- lmer(glucose~1+(1|day/run)) > summary(glucose.mod4) Linear mixed model fit by REML Formula: glucose ~ 1 + (1 | day/run) AIC BIC logLik deviance REMLdev 69.72 73.28 -30.86 62.57 61.72 Random effects: Groups Name Variance Std.Dev. run:day (Intercept) 1.43519 1.1980 day (Intercept) 0.23824 0.4881 Residual 1.14667 1.0708 Number of obs: 18, groups: run:day, 6; day, 3 Fixed effects: Estimate Std. Error t value (Intercept) 42.7667 0.6183 69.17 > >