BookmarkSubscribeRSS Feed
sasjourney
Calcite | Level 5

Hi All,

I was working on proc mixed and figured out that one of the proc mixed procedures didn't converge when I used different orders in class and model statements. But when I used the same order in both the statements, seems like it is working. So I was curious to know that will there be any effect of specifying the order.

Below is the example:

class var1 var2 var3;

model xyz=var2 var1 var3;

when I don't follow the order the model didn't converge, but when I changed the order as below it worked

class var1 var2 var3;

model xyz=var1 var2 var3;

Thanks

3 REPLIES 3
SteveDenham
Jade | Level 19

Probably a sweep operator "feature."  Column order in the design matrix can often lead to near singularity when the sweep operator is applied during matrix inversion.  What sort of notes in the log, or notations in the output listing were given when the model did not converge?

Steve Denham

sasjourney
Calcite | Level 5

Hi Steve,

Below are the notes and warnings from the log when the model didn't converge.

WARNING: Stopped because of infinite likelihood.

NOTE: The data set WORK.TEST has 8 observations and 2 variables.

NOTE: Compressing data set WORK.TEST increased size by 100.00 percent.

Compressed is 2 pages; un-compressed would require 1 pages.

NOTE: The data set WORK.CONV has 1 observations and 4 variables.

NOTE: Compressing data set WORK.CONV increased size by 100.00 percent.

Compressed is 2 pages; un-compressed would require 1 pages.

WARNING: Output 'Lsmeans' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the

appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used.

NOTE: PROCEDURE MIXED used (Total process time):

real time 5.82 seconds

cpu time 5.82 seconds

Thanks

SteveDenham
Jade | Level 19

The warning "Stopped because of infinite likelihood" raises some questions.  Are there other statements in your PROC MIXED block (especially a REPEATED statement)?

I'm also a bit baffled by the notes regarding the datasets.  Surely these are not the datasets being passed to PROC MIXED, as for TEST there are only two variables, and for CONV, while there are enough variables for the specified model, there is only one record.

Finally, it does look like PROC MIXED tries (cpu time almost 6 seconds) before the infinite likelihood problem is reached.  That really does implicate the sweep operator.  Have you tried using PROC GLIMMIX and using different optimization methods?

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 2761 views
  • 0 likes
  • 2 in conversation