Programming the statistical procedures from SAS

Order of variables in Proc Mixed

Reply
Contributor
Posts: 43

Order of variables in Proc Mixed

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

Respected Advisor
Posts: 2,655

Order of variables in Proc Mixed

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

Contributor
Posts: 43

Order of variables in Proc Mixed

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

Respected Advisor
Posts: 2,655

Order of variables in Proc Mixed

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

Ask a Question
Discussion stats
  • 3 replies
  • 605 views
  • 0 likes
  • 2 in conversation