3.2 Logistic model

Examine the bivariate relationship first among variables to high protein status of milk. Check for quasi or complete separation of categories. Shout out to Lisa Avery for this function!

plotuv(data=Milk, response='High_Protein', covs=c('Cow', 'Yard', 'Diet', 'Time', 'protein'));

Below logistic model does not account for clustering of repeat observations by cow to high protein status of milk.

rm_mvsum(model=glm(High_Protein ~ Diet + Yard + Time, data=Milk, family='binomial'), showN=T, vif=T);
OR(95%CI) p-value N Event VIF
Diet 1337 386 1.02
barley Reference 425 183
barley+lupins 0.45 (0.33, 0.60) <0.001 459 119
lupins 0.30 (0.22, 0.41) <0.001 453 84
Yard 1337 386 1.01
1 Reference 188 56
2 1.11 (0.72, 1.70) 0.64 307 78
3 0.74 (0.48, 1.14) 0.17 263 63
4 0.93 (0.62, 1.41) 0.74 324 86
5 1.60 (1.06, 2.42) 0.027 255 103
Time 0.97 (0.95, 1.00) 0.038 1337 386 1.00