August 14, 2018

Chickweight Dataset

Chickenweight dataset is the data of from an experiment on the effect of diet on early growth of chicks.

The body weights of the chicks were measured at birth and every second day thereafter until day 20. They were also measured on day 21. There were four groups on chicks on different protein diets.

This dataset was originally part of package nlme, and that has methods (including for [, as.data.frame, plot and print) for its grouped-data classes.

The ChickWeight data frame has 578 rows and 4 columns

  weight Time Chick   Diet
1     42    0     1 Diet 1
2     51    2     1 Diet 1
3     59    4     1 Diet 1
4     64    6     1 Diet 1
5     76    8     1 Diet 1
6     93   10     1 Diet 1

Variables

  • weight: a numeric vector giving the body weight of the chick (gm).
  • Time: a numeric vector giving the number of days since birth when the measurement was made.
  • Chick: an ordered factor with levels 18 < … < 48 giving a unique identifier for the chick. The ordering of the levels groups chicks on the same diet together and orders them according to their final weight (lightest to heaviest) within diet.
  • Diet: a factor with levels 1, …, 4 indicating which experimental diet the chick received.

Plots

General boxplot of Weight vs Chicks Age by Diet

Diet trends by mean of chicks weight

Observe each Diet and Fit Model

`geom_smooth()` using method = 'loess' and formula 'y ~ x'