I have a large dataset with longitudinal data from patients with repeated measures and unbalanced timepoints. The dependent variable is the level of protein, and I have several fixed predictors. The best-fitting model is a linear mixed model which is a random intercepts and slopes model. The random intercept is patient ID and the random slope is patient ID with time. There is an unstructured covariance structure with significant covariance between intercept and slope. Estimation is with maximum likelihood. The goodness of fit is -2log likelihood ratio.
I want to determine a measure of R squared of the fixed predictors in the model. I have read around about this but I’m not sure what the best way to do this is, and I’m not sure if my stats package SPSS could do this in any case. But
My question: is the following a valid R squared?:
R squared = 1 - (-2log likelihood ratio of null model/-2log likelihood ratio of full model)
Where the null model is the random intercepts only model with no fixed covariates).
If so, does the covariance structure have to be the same for both models, i.e., unstructured, and the estimation be maximum likelihood for both?