agridat (version 1.23)

urquhart.feedlot: Weight gain calves in a feedlot

Description

Weight gain calves in a feedlot, given three different diets.

Usage

data("urquhart.feedlot")

Arguments

Format

A data frame with 67 observations on the following 5 variables.

animal

animal ID

herd

herd ID

diet

diet: Low, Medium, High

weight1

initial weight

weight2

slaughter weight

Details

Calves born in 1975 in 11 different herds entered a feedlot as yearlings. Each animal was fed one of three diets with low, medium, or high energy. The original sources explored the use of some contrasts for comparing breeds.

HerdBreed
9New Mexico Herefords
16New Mexico Herefords
3Utah State University Herefords
32Angus
24Angus x Hereford (cross)
31Charolais x Hereford
19Charolais x Hereford
36Charolais x Hereford
34Brangus
35Brangus
33Southern Select

References

N. Scott Urquhart and David L. Weeks (1978). Linear Models in Messy Data: Some Problems and Alternatives Biometrics, 34, 696-705. https://doi.org/10.2307/2530391

Also available in the 'emmeans' package as the 'feedlot' data.

Examples

Run this code
if (FALSE) {
  
  library(agridat)
  data(urquhart.feedlot)
  dat <- urquhart.feedlot

  libs(reshape2)
  d2 <- melt(dat, id.vars=c('animal','herd','diet'))

  libs(latticeExtra)
  useOuterStrips(xyplot(value ~ variable|diet*herd, data=d2, group=animal,
                        type='l',
                        xlab="Initial & slaughter timepoint for each diet",
                        ylab="Weight for each herd",
                        main="urquhart.feedlot - weight gain by animal"))


  # simple fixed-effects model 
  dat <- transform(dat, animal = factor(animal), herd=factor(herd))
  m1 <- lm(weight2 ~ weight1 + herd*diet, data = dat)
  coef(m1) # weight1 = 1.1373 match Urquhart table 5 common slope
  
  # random-effects model might be better, for example
  # libs(lme4)
  # m1 <- lmer(weight2 ~ -1 + diet + weight1 + (1|herd), data=dat)
  # summary(m1) # weight1 = 1.2269
  
}

Run the code above in your browser using DataLab