NMST432 Advanced Regression Models

Exercise on description of longitudinal data

Back to course page

Dataset below is a dataset from a text by Luc Duchateau, Paul Janssen, and John Rowlands published by International Livestock Research Institute in Nairobi, Kenya.

Story behind the data

The N'Dama breed of cattle is not affected as severely by trypanosomosis as some other breeds. Changes in PCV following experimental infection with trypanosomes have been studied to demonstrate differences in susceptibility between the N'Dama and Boran breeds.


Dataset which is read into R by the code below contains data on longitudinal measurements of the PCV on 12 cows (6 cows of Boran breed, 6 cows of N'Dama breed). There are the following variables in the dataset:

dt33 <- read.table("./Data/DJR_33.dat", header = TRUE, stringsAsFactors = FALSE)
dt33 <- transform(dt33, breed = factor(breed))
##       id            breed        time            PCV       
##  Length:168         BO:84   Min.   : 0.00   Min.   :15.90  
##  Class :character   ND:84   1st Qu.: 7.00   1st Qu.:25.50  
##  Mode  :character           Median :17.50   Median :28.75  
##                             Mean   :16.78   Mean   :28.85  
##                             3rd Qu.:25.00   3rd Qu.:32.12  
##                             Max.   :35.00   Max.   :40.40
with(dt33, table(id))
## id
##   BO1 BO209 BO241 BO322 BO326  BO37  ND60  ND66  ND72  ND73  ND74  ND75 
##    14    14    14    14    14    14    14    14    14    14    14    14

Exercise task

Perform a descriptive analysis aimed in suggesting a suitable linear mixed model for a longitudinal evolution of PCV over time while taking into account the fact that the mean evolution is possibly different for different breeds. Additionally, suggest how to use the model to test for different susceptibility towards trypanosomosis between N'Dama and Boran breeds.

Back to course page