I am working on a program in SAS that seeks to extract r2 based on the residual variance produced by covariance parameter estimates in
The specification of the covariance structure was previously specified as unstructured, because AIC comparisons and case studies determined it was the best fit.
The problem is that a residual variance estimate is not produced when I specify the covariance structure as
type=un (unstructured). A snippet of the code is below.
proc mixed data=unidata method=ml; class SUBNUM drugcode time; model y= baselinescore DRUGCODEN time time*drugcode/solution cl; repeated time /subject=SUBNUM type=un r rcorr;
When we initially looked at covariance structures for this data, it came down to unstructured and autoregressive covariance structures; they had the lowest AICs and best described the within-subject correlation in the repeated measurements design. AR(1) actually scored slightly better on AIC. I suspect that TYPE=UN was specified for this data mainly due to convention and the fact that the difference between AR(1) and UN covariance structures had minimal effect on the model results.
But now that we need to extract r2 from the model, it's hard to determine why the unstructured covariance provides no residual variance estimates, while AR(1) structure does provide an estimate. Is something wrong with my code that is resulting in no residuals under Covariance Parameter Estimates, or is it because of the covariance structure I specified?
Many thanks for reading and any guidance.