Bodyweight of cows in a 2-by-2 factorial experiment.

Format

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

animal

Animal factor, 26 levels

iron

Factor with levels Iron, NoIron

infect

Factor levels Infected, NonInfected

weight

Weight in (rounded to nearest 5) kilograms

day

Days after birth

Details

Diggle et al., 1994, pp. 100-101, consider an experiment that studied how iron dosing (none/standard) and micro-organism (infected or non-infected) influence the weight of cows.

Twenty-eight cows were allocated in a 2-by-2 factorial design with these factors. Some calves were inoculated with tuberculosis at six weeks of age. At six months, some calves were maintained on supplemental iron diet for a further 27 months.

The weight of each animal was measured at 23 times, unequally spaced. One cow died during the study and data for another cow was removed.

Source

Diggle, P. J., Liang, K.-Y., & Zeger, S. L. (1994). Analysis of Longitudinal Data. Page 100-101.

Retrieved Oct 2011 from https://www.maths.lancs.ac.uk/~diggle/lda/Datasets/

References

Lepper, AWD and Lewis, VM, 1989. Effects of altered dietary iron intake in Mycobacterium paratuberculosis-infected dairy cattle: sequential observations on growth, iron and copper metabolism and development of paratuberculosis. Research in veterinary science, 46, 289--296.

Arunas P. Verbyla and Brian R. Cullis and Michael G. Kenward and Sue J. Welham, (1999), The analysis of designed experiments and longitudinal data by using smoothing splines. Appl. Statist., 48, 269--311.

SAS/STAT(R) 9.2 User's Guide, Second Edition. https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sect018.htm

Examples

# \dontrun{ library(agridat) data(diggle.cow) dat <- diggle.cow # Figure 1 of Verbyla 1999 libs(latticeExtra) useOuterStrips(xyplot(weight ~ day|iron*infect, dat, group=animal, type='b', cex=.5, main="diggle.cow"))
# Scaling dat <- transform(dat, time = (day-122)/10) libs(asreml) # asreml4 ## libs(latticeExtra) ## # Smooth for each animal. No treatment effects. Similar to SAS Output 38.6.9 m1 <- asreml(weight ~ 1 + lin(time) + animal + animal:lin(time), data=dat, random = ~ animal:spl(time))
#> Model fitted using the gamma parameterization. #> ASReml 4.1.0 Mon Jan 11 17:08:14 2021 #> Spline: design points closer than 0.00659 have been merged. #> LogLik Sigma2 DF wall cpu #> 1 -1685.373 89.4521 545 17:08:14 0.0 #> 2 -1662.656 79.4217 545 17:08:14 0.0 #> 3 -1633.382 66.9151 545 17:08:14 0.0 #> 4 -1607.650 55.6989 545 17:08:14 0.0 #> 5 -1590.169 46.6521 545 17:08:14 0.0 #> 6 -1584.009 41.6081 545 17:08:14 0.0 #> 7 -1582.756 39.2910 545 17:08:14 0.0 #> 8 -1582.631 38.5276 545 17:08:14 0.0 #> 9 -1582.625 38.3532 545 17:08:14 0.0 #> 10 -1582.625 38.3205 545 17:08:14 0.0
p1 <- predict(m1, data=dat, classify="animal:time", design.points=list(time=seq(0,65.9, length=50)))
#> Model fitted using the gamma parameterization. #> ASReml 4.1.0 Mon Jan 11 17:08:14 2021 #> Spline: design points closer than 0.00659 have been merged. #> LogLik Sigma2 DF wall cpu #> 1 -1582.625 38.3147 545 17:08:14 0.1 #> 2 -1582.625 38.3143 545 17:08:14 0.0 #> 3 -1582.625 38.3136 545 17:08:14 0.0
p1 <- p1$pvals p1 <- merge(dat, p1, all=TRUE) # to get iron/infect merged in foo1 <- xyplot(weight ~ day|iron*infect, dat, group=animal) foo2 <- xyplot(predicted.value ~ day|iron*infect, p1, type='l', group=animal) print(foo1+foo2)
# }