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

Hello,

 

how can I efficiently model multilevel models for discrete proportions that result from a 3x2 contingency table? The hierarchical structure does not result from longitudinal data but from different study centers; the random effects should be allowed to have an unstructured correlation matrix. I'm not interested in the main effects, so I just need the interaction of both factors.

I tried proc glimmix with a poisson distribution but that approach failed to converge:

 

proc glimmix data= data method= quad;
class  a b center;
  model count= a*b / d= poisson ddfm=none;  /* count is the count per cell, a (3 categories) and b (2 categories) are the factors*/
random a*b / sub= center g type=un ;
run;

 

Thanks for any hints!

M

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

For a 3x2 table, consider a multinomial distribution. A good start might be Example 45.13 Response Surface Comparisons with Multiplicty Adjustments in the SAS/STAT14.1 documentation.  The second part looks at a cumulative logit.  My thought is to consider the factor with 3 levels as the response variable, and the 2 level factor as an independent variable.  The example shows how to code for a random center effect.  I really wouldn't try to put a structure on that.  Try:

 

proc glimmix data= data method= quad;
class  a b center;
  model a= b / d=multinomial link=cumlogit ddfm=none; 
random intercept / sub= center g ;
run

Probably have to drag odds ratios into this for comparisons.  See how this works, and come back with what you find.

 

Steve Denham

View solution in original post

2 REPLIES 2
RyanSimmons
Pyrite | Level 9

You should be careful including only an interaction term, without the main effects, in any model. While it's not invalid to do so, the interpretation may not be exactly what you expect, especially in a non-randomized setting.

 

In any case, without seeing what your data look like, or exactly what sort of errors GLIMMIX gave you, it's hard to give a lot of specific advice. For me, I would try fitting the model in PROC NLMIXED or PROC MCMC. I find it is easier to diagnose convergence or other performance issues in mixed models under those frameworks, and forcing you to actually write out the likelihood function is a good way of making you think about whether or not you are fitting the model you think you are.

SteveDenham
Jade | Level 19

For a 3x2 table, consider a multinomial distribution. A good start might be Example 45.13 Response Surface Comparisons with Multiplicty Adjustments in the SAS/STAT14.1 documentation.  The second part looks at a cumulative logit.  My thought is to consider the factor with 3 levels as the response variable, and the 2 level factor as an independent variable.  The example shows how to code for a random center effect.  I really wouldn't try to put a structure on that.  Try:

 

proc glimmix data= data method= quad;
class  a b center;
  model a= b / d=multinomial link=cumlogit ddfm=none; 
random intercept / sub= center g ;
run

Probably have to drag odds ratios into this for comparisons.  See how this works, and come back with what you find.

 

Steve Denham

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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