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

SAS newbie here. My dataset is attached. There are four unordered response categories, three covariates (one with 2 df) and one clustering variable. Here's the code:

 

title "Frequentist equivalent of mnmixed1 in R with CompLemma (all verbs included) (AGQ = 11)";
PROC GLIMMIX DATA=mylib.smallermand method=quad(qpoints = 11);
class dv polarity time_period CompLemma / ref=first;
model dv (ref=first) = Word_Dist time_period polarity / SOLUTION DIST=MULTINOMIAL LINK=GLOGIT;
RANDOM INTERCEPT / SUBJECT=CompLemma GROUP=dv SOLUTION; 
         ods output solutionr=sr(keep=effect CompLemma estimate
                                 rename=(estimate=ssdev));
run; 

The results make sense except for one thing. The variance component, as well as all individual random effects, are reported as zero for the 2nd category pairing (C vs A). This seems implausible and also doesn't agree with results I've obtained with other (Bayesian) software. I fully buy that the overall random-effect variance may be very low for C vs A, and I fully buy that many of the individual random effects may be zero because many of the clusters have very few observations. But I do not buy that they are all zero and only for one category pairing. I rather suspect a newbie error committed by myself, somewhere.

Any and all feedback would be gratefully welcomed.

1 ACCEPTED SOLUTION

Accepted Solutions
STAT_Kathleen
SAS Employee
The note about G matrix not being positive definite is typically caused by a zero estimate for the variance component. If you examine the Covariance Parameter Estimate table, you will probably see the 0 estimate for the variance. Zero variance estimate is caused by a variety of reasons, such as outliers in the data, not enough variations in the random effect, etc. Since the Covariance Parameter for Group dv C is zero this would also impact the Solution for Random effects table in that I would expect dv C intercepts to be zero or value close to zero.

Your syntax is valid for estimating a multinomial model in PROC GLIMMIX. You have to specify GROUP=dependent variable in the RANDOM statement in order to estimate a multinomial model in GLIMMIX. Also an intercept cannot be suppressed in models for multinomial data.

View solution in original post

5 REPLIES 5
SteveDenham
Jade | Level 19

The only thing that strikes me as unusual is using GROUP=dv.  I think this may be confounding things to the point that all the variation is captured in the comparison A vs B.

 

A possibility would be to fit a NOINT option in the MODEL statement.  This should move the variance currently attributed to the intercept, and thus in residual error, to the comparisons of interest. However, that is just a shot in the dark.

 

SteveDenham

STAT_Kathleen
SAS Employee
The note about G matrix not being positive definite is typically caused by a zero estimate for the variance component. If you examine the Covariance Parameter Estimate table, you will probably see the 0 estimate for the variance. Zero variance estimate is caused by a variety of reasons, such as outliers in the data, not enough variations in the random effect, etc. Since the Covariance Parameter for Group dv C is zero this would also impact the Solution for Random effects table in that I would expect dv C intercepts to be zero or value close to zero.

Your syntax is valid for estimating a multinomial model in PROC GLIMMIX. You have to specify GROUP=dependent variable in the RANDOM statement in order to estimate a multinomial model in GLIMMIX. Also an intercept cannot be suppressed in models for multinomial data.

SteveDenham
Jade | Level 19

Thanks @STAT_Kathleen .  I really appreciate the knowledge about the multinomial in GLIMMIX.  I wish that it appeared in documentation of the DIST= option or in one of the examples,  It seems that sometimes an error message is how I learn something critical - this really helps,

 

SteveDenham

STAT_Kathleen
SAS Employee
Steve,
I will pass your comments to the developer. I will also work with the developer to improve the GLIMMIX documentation for multinomial models. The Response-Level Ordering and Referencing in the Details section of the GLIMMIX documentation provides some information with example code with syntax for generalized logit with unordered responses and random effects. When you have multinomial distribution with unordered responses and RANDOM effects that requires the GROUP= option in RANDOM statement. The Example section in GLIMMIX documentation currently has multinomial with ordered responses using a cumprobit link and random effects.
The following textbook and SGF papers have some examples of using GLIMMIX for the analysis of various types of multinomial models:
Stroup, W. W. 2012. Generalized Linear Mixed Models: Modern Concepts, Methods and Applications. New York: Chapman & Hall/CRC.
https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/196-30.pdf
https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2179-2018.pdf
Thank you for your feedback.
Kathleen




blokeman
Fluorite | Level 6

Firstly, my apologies for not responding to your contributions earlier. I was expecting to be email-notified of responses in the thread the way I had been the previous time I asked something here, but this time that didn't happen.

 

Thanks for explaining the deal with the G-matrix and the zero covariance. It is indeed the case in my analysis that all the individual random-effect estimates/BLUPs are reported as zero for the category pairing with the zero variance component, i.e. C vs A. Such a result continues to seem implausible to me, but it is reassuring to hear that an error on my part is not the cause.

 

As for Steve's speculation about the possibility of variance being "stolen" from the other category pairings and misattributed to B vs A, I can confirm that B vs A actually exhibits more variation than the other pairings. In other words, its larger variance component makes sense from a subject-matter perspective.

 

 

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