BookmarkSubscribeRSS Feed
BlueNose
Quartz | Level 8

Hello

I am trying to use GLIMMIX to model a GLMM but SAS struggles so I am probably doing something wrong.

Let's say hypothetically that I have data about radiologists, who are trying to diagnose if tumors are cancerous using 2 different imaging machines. Each doctor checks all 50 patients using both machines. Each patient has one or more tumors to be checked. It is known (by biopsy) that the tumors are cancerous, basically I am trying to model the sensitivity, in a way.

I have these variables:

Y = diagnosed correctly / did not diagnose correctly

G = Group (the machine being used)

Patient_ID

Doctor_ID

I was trying this model (based on a book, I NEED all these interactions):

proc glimmix data= data method = laplace;

  class Patient_ID Doctor_ID G ;

  model Y =  G /solution dist = binary link = logit;

  random Patient_ID Doctor_ID Patient_ID*Doctor_ID Patient_ID*G Doctor_ID*G ;

  LSmeans G / pdiff cl;

run ;


The model ran and ran....and then I got an incomplete output with this msg: The SAS System stopped processing this step because of insufficient memory.

Trying to use QUAD didn't work because the random statement wasn't suitable, and using neither QUAD or LAPLACE also didn't run good.

What am I doing wrong ?

Thank you !

P.S If I use PROC MIXED (imagining that Y is continuous - for averaging) it actually works and give me estimates which are like the average sensitivity I calculated "by hand".


1 REPLY 1
SteveDenham
Jade | Level 19

I think what might have to do is "roll up" the data to at least the Patient ID level, and perhaps to the Doctor ID level.  If you go to the Patient ID level, then the response variable could be put into the events/trials syntax, with events=number of tumors correctly identified and trials=number of tumors per individual.  With this approach, code would look something like:

 

proc glimmix data= data method = laplace;

  class Patient_ID Doctor_ID G ;

  model events/trials =  G /solution ;

  random Patient_ID Doctor_ID Patient_ID*Doctor_ID Patient_ID*G Doctor_ID*G ;

  LSmeans G / pdiff cl;

run ;

 

What this accomplishes is to switch from the binary approach to the default binomial for events/trials, which is a lot more stable as far as algorithms go.  Dealing with multiple 0 and 1 records may lead to the objective function jumping around.

 

Another thing to consider would be adding an NLOPTIONS statement, and using one of the derivative-free optimization methods.

 

Steve Denham

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 1369 views
  • 1 like
  • 2 in conversation