I have a data set with 3 measurements on each subject and a set of covariates. When I run PROC MIXED for my regression analysis again, it creates different regression coefficients that are sometimes slightly different but sometimes more different. I mean some significant factors change to nonsignificant or vice versa. Also, the model sometimes converges and sometimes does not. Any thoughts?
When I run PROC MIXED for my regression analysis again, it creates different regression coefficients
Do you mean you run the EXACT SAME CODE each time, and the results differ?
And you run the code on the exact same data set, which hasn't changed at all?
Yes! For example when I use a different TYPE for covariance structure, sometimes my model converges, and sometimes it does not!
I asked another friend to try the same data and same model, and our results are again different!
Search the program for the characters 'ran' (case insensitive) to see where the program is using the RAND or the older RANUNI/RANNOR functions. I suspect that the LONG data set is different each time you run the program.
Do a text search (CTRL+F) in the program window, or whatever text editor you are using to write the SAS program.
Thank you, Paige Miller and Rick_SAS for your thoughts on my question.
Rick_SAS, I did not include a random intercept in my model yet (if your question is about that). I am planning to do so though, once I have a better sense of what is going on in my model.
Do you think it has anything with local minimized errors?
In some optimization methods there are local and overall minimum errors, I am not sure if this applies to my model.
You should expect changes in the output if you change the type of the covariance matrix. There are multiple inversions of the full matrix involved, and changing the constraints on the parameters in parts of the matrix (the Z part, or the R part of the residuals) will result in different solution vectors. While means might converge to a point solution, the standard errors and resulting tests of significance are going to be different due to those constraints.
SteveDenham
Please post the complete SAS log from one of your runs. Seeing the program is the only way to identify why the data are different.
When providing logs for us, it is important to maintain the formatting of the log, which makes it more readable and more usable. The unformatted log you provided is difficult to read, and I generally don't bother.
To do this, copy the log as text and paste it into the window that appears when you click on the </> icon.
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.