This function is called by sur_sample_cov_cpp.
It samples the covariance matrix of a SUR
sur_sample_cov_helper_cpp(Y, Xlist, n, J, pj, sigma11, r1)A matrix, each column a vector of responses
A list, each element a design matrix
Integer giving number of observations
Integer giving number of endpoints
A vector giving number of covariates per endpoint
A scalar giving a draw for the (1,1) component of the covariance matrix
A vector of residuals for the first endpoint's regression