Learn R Programming

SASmixed (version 0.1-7)

AvgDailyGain: Average daily weight gain of steers on different diets

Description

The AvgDailyGain data frame has 32 rows and 6 columns.

Arguments

source

Littel, R. C., Milliken, G. A., Stroup, W. W., and Wolfinger, R. D. (1996), SAS System for Mixed Models, SAS Institute (Data Set 5.3).

Examples

Run this code
data(AvgDailyGain)
options(
  contrasts = c(unordered = "contr.SAS", ordered = "contr.poly"))
## plot of adg versus Treatment by Block
coplot(adg ~ as.numeric(Treatment) | Block, data = AvgDailyGain,
       show = FALSE)
fm1Adg <- lme( adg ~ InitWt * Treatment - 1, 
      data = AvgDailyGain, random = ~ 1 | Block)
summary( fm1Adg ) # compare with output 5.1, p. 178
VarCorr( fm1Adg ) # show the variance component estimates
anova( fm1Adg )   # checking significance of terms
fm2Adg <- update( fm1Adg, adg ~ InitWt + Treatment )  # common slope model
summary( fm2Adg )
VarCorr( fm2Adg )
anova( fm2Adg )
summary( update( fm1Adg, adg ~ InitWt + Treatment - 1 ) )

Run the code above in your browser using DataLab