BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kivanvan
Obsidian | Level 7

I have a convergence issue in my linear mixed effect model using REPEATED statement in PROC MIXED. It first came up when I used original dependent variable that I later found its problem in normality, so I log transformed the data. After the log transformation, the convergence issue was solved under VC matrix, and I was trying to find the best covariance matrix. Then I realized that not all the matrices converge. I tried VC, UN, CS, AR(1), and TOEP. Only VC, UN, and TOEP converged. I got "WARNING: Stopped because of infinite likelihood." in my output for other matrices.

 

 
 

My data has 5 repeated measures, but the number of sample size decreased from 2000+ at baseline to 10 in the last visit. I used the whole data to run the model. That's one thing I can think of that might be related. I tried to exclude the last two visits and there were no problem with convergence. 

 

Another thing is that the correlation coefficients are not monotone over repeated measures. I will show a screenshot of correlation matrix from UN so that you can have an idea about it.

 

Here is my code for UN matrix:

PROC MIXED DATA=DF METHOD=REML;
 CLASS ID FOLLOWUP EXPOSURE;
 MODEL OUTCOME_LOG= EXPOSURE FOLLOWUP EXPOSURE*FOLLOWUP / SOLUTION CHISQ DDFM=KR;
 REPEATED FOLLOWUP / SUBJECT=ID TYPE=UN R RCORR;
 ODS SELECT ModelInfo NObs CorrB ConvergenceStatus FitStatistics;
RUN;

The correlation matrix from UN: 

corrmatrix.png

 

I still want to keep all visits in the model if possible. Is there any idea of what can possible cause the problem of model not converging and how I can solve it? Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

What happens if you add the singular=1e-10 option in the MODEL statement in PROC MIXED?

 

if it does not help, I would go with the UN or TOEP structure (depending on which one fits your data better) using all data. If some covariance structures do not give you a convergence, maybe those structures are not appropriate for your data.

View solution in original post

6 REPLIES 6
SteveDenham
Jade | Level 19

That odd correlation between the first and last timepoint is likely the source of the infinite likelihood for CS and AR(1).  CS assumes identical covariances between all of the timepoints, and AR(1) assumes a monotonic correlation of the errors.  The only way I see around this is dropping at least that last timepoint for these structures, which you have done.

 

So, you have VC, TOEP and UN that converged.  Which gives you the best corrected AIC?  The fact that you got the UN structure to converge says a lot.  Sometimes the simplest model is NOT the best fit, and no amount of tinkering can get a square peg into a truly round whole unless you give up something that defines squareness.  Here, I think it would mean giving up at least one timepoint.

 

SteveDenham 

kivanvan
Obsidian | Level 7

Thanks SteveDenham! The UN has the best AIC, but for my another exposure (with the same outcome), I only get VC and TOEP converged, which makes it a little tricky to me as I want to use the same matrix for both of them.

My strategy is to use a simple model to decide the covariance matrix and then add all the covariates to the model, but I never know if it's a good strategy. 

jiltao
SAS Super FREQ

What happens if you add the singular=1e-10 option in the MODEL statement in PROC MIXED?

 

if it does not help, I would go with the UN or TOEP structure (depending on which one fits your data better) using all data. If some covariance structures do not give you a convergence, maybe those structures are not appropriate for your data.

kivanvan
Obsidian | Level 7

It works! Do you mind explaining the rationale behind it? I'm just not sure if I can fully understand the SAS documentation. Thanks!!

jiltao
SAS Super FREQ

Sometimes the default singularity criterion might be too strict and relaxing the criterion might help. This can be the case when the message you get is "Warning: Stopped because of infinite likelihood". You need to be careful not to relax the criterion too much though.

kivanvan
Obsidian | Level 7

That's exactly the message I got. Thanks a lot!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 2466 views
  • 4 likes
  • 3 in conversation