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.01
barley Reference 425 183
barley+lupins 0.47 (0.35, 0.62) <0.001 459 119
lupins 0.32 (0.23, 0.43) <0.001 453 84
Yard 1337 386 1.01
1 Reference 169 45
2 0.91 (0.59, 1.41) 0.67 304 83
3 1.17 (0.77, 1.81) 0.47 308 103
4 0.60 (0.37, 0.96) 0.034 262 49
5 1.35 (0.88, 2.08) 0.17 294 106
Time 0.97 (0.95, 1.00) 0.036 1337 386 1.00