June 2017
Beginner to intermediate
576 pages
15h 22m
English
For the covariance matrix, we can either use separate matrices for the two diabetes outcomes (1,0), or use a pooled covariance matrix, which shows the correlations among the variables regardless of the outcome.
We will use the separate correlation or covariance matrices since we have enough observations for each outcome (n=500 and n=268). If either of these classes were much smaller related to the other, we could use the pooled (or total) covariance matrix instead, since that would cover a larger set of observations.
Some notes on the code which follows: