Hi, Thanks for the log and output. Let's call your two BY conditions 1A and 2B. When you add the SOLUTION option on the RANDOM statement, I see in your output for 2B that the table "Covariance Parameter Estimates" stays the same, whereas the tables "Solutions for Fixed Effects" and "Estimates" change. It is puzzling that the estimates for the covariance parameters stay the same, but the estimates for fixed effects (which are functions of the covariance parms) change. Off hand, I don't know why adding the SOLUTION option on the RANDOM statement should change the model. Maybe the option changes the inverse matrix being used in estimates? As @Ksharp mentioned, you do have numerical problems with your model that you should fix. Here is a blog with some more information about the note "Estimated G matrix is not positive definite": Convergence in mixed models: When the estimated G matrix is not positive definite - The DO Loop You do want to do something about a non-positive definite G matrix and don't want to continue with results where that is an issue. Some things you could try: 1) Remove one of AVISITN or TIMEK from the RANDOM statement. This reduces your covariance matrix to make it simpler. I vote for removing AVISITN, since it has a zero variance estimate in your 1A case.
2) Specify the NOBOUND option on the PROC MIXED statement to allow variance components to be allowed to be negative. I don't have a lot of experience with doing this. 3) Try forming your covariance structure with a REPEATED statement instead of a RANDOM statement. For example, you could try a spatial power covariance structure with TYPE=SP(POW)(TIMEK). 4) Run this model in PROC GLIMMIX instead of PROC MIXED. You'd need to remove the METHOD=REML option, but otherwise, I think your code should run without edits. I doubt that using GLIMMIX would do anything about your non-positive G matrix, but it might help with the fact that your output is changing when the SOLUTION option is added.
To really get to the bottom of this, I suggest you contact SAS tech support. Their help is included with your license: SAS Technical Support | SAS Support
... View more