Hi there,
I have a 3-level growth model, where each patient has 3 waves of data recorded and the patients are nested within 6 hospitals. I should mention that my outcome is continuous. The patients were allocated to either of the two treatments available at each of the hospitals, and I am interested to see whether one treatment is better than another. I am assuming random intercepts and slopes as well as the unstructured covariance structure.
So this is what my model looks like in SAS:
proc mixed data=data covtest nobound;
class patientid hospital trt sex;
model outcome=time trt time*trt sex age/solution;
random intercept time/ type=UN sub=hospital;
random intercept time/ type=UN sub=patientid(hospital);
run;
My problem is that I keep getting a warning that the G matrix is non-positive definite. For the level 3 residuals I get negative variances for the intercepts and for the level 2 residuals I am getting both intercept and slope variances to be negative. I have tried FA(2) and some other covariance structures in the combination with 'parms' statement (which should also be ensuring that the G matrix is positive definite), but I still get the same problem.
Any suggestions would be greatly appreciated it. Thank you very much.