Hello,
I have 65 participants who have weight measurements over 3 time points. These participants are also nested within dyads that are also nested within different communities. I have yet to find syntax for a 4 level MLM and would like suggestions to keep or for revisions of the current one I have. I have tried multiple variations and have received multiple error messages (i.e., 'model does not converge', 'the step stopped because of too many likelihood estimates', ' Estimated G matrix is not positive definite').
I want to first check if the syntax for my unconditional model looks remotely correct.
proc mixed data = rednep noclprint covtest maxiter=1000 maxfunc=5000;
class adult_id dyadid church_site;
model wt = time / solution ddfm=kr notest alpha=.05;
random intercept time / subject=adult_id (dyadid) type=un;
random intercept time / subject=dyadid (church_site) type=un;
random intercept time / subject=church_site type=un;
run;
I think conceptually it's probably fine, but with only 65 observations you are asking your model to do a lot. As written, it's estimating a unique parameter (type = un) for each of the matrices you've specified (since time is a 3-level variable, those are 4x4 matrices). It sounds like the convergence issues you're having are because of this workload--there is perhaps just not enough information to do everything you're asking. If it were me, I'd start trimming away random effects that are not supported by the data. You could consider using some fixed effects instead of random effects where appropriate.
This is a good resource for MLM: https://support.sas.com/resources/papers/proceedings13/433-2013.pdf
Also see here for information about your error messages: https://blogs.sas.com/content/iml/2019/04/03/g-matrix-is-not-positive-definite.html
Good luck!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.