Programming the statistical procedures from SAS

GLIMMIX Output Question

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

GLIMMIX Output Question

Hello everyone:

I am a novice to multi level modeling and have a program running using Proc GLIMMIX. Its a two level model, relatively straightforward, several covariates (from survey data), country level is the 2nd level.

Things look ok however, I have requested odds ratios and am getting strange output. Instead of the nice, clean usual output screen you get from say, PROC LOGISTIC, I seem to be getting a matrix that makes it hard to tell the odds ratio for each variable. I also have a few ordinal variables in the model and it seems SAS is giving me an odds ratio for EACH level of the variable (unlike PROC LOGISTIC that gives one odds ratio for each unit increase in the ordinal variable)?

Any ideas or easy-to-read sources for a new GLIMMIX user? Thanks


Accepted Solutions
Solution
‎08-26-2011 08:01 AM
Respected Advisor
Posts: 2,655

GLIMMIX Output Question

This is kind of working the long way around, but what about putting the odds ratio and any other results into datasets using ODS output, and then manipulating the datasets to pretty it up to what you need?

Steve Denham

View solution in original post


All Replies
Super User
Posts: 18,498

GLIMMIX Output Question

Are you including the variable in the Class statement or is it in an interaction term with another categorical variable?

Occasional Contributor
Posts: 12

GLIMMIX Output Question

Thank for for getting back to me.  The ordinal variable is not in the class statement. I can see the results but everything is in a matrix format that makes interpretation difficult almost like SAS is trying to contrast every variable against each other variable and not presenting fixed effects and odds ratios in one table as with Proc Logistic. If it helps, code is below. (yes, I am a sociologist, running quite a few variables in the model) The outcome is binary (0/1) and LOGPPP is a second level variable for country purchasing power parity (logged), along with country for each country,  RELATTEND, SOCLASS, and CHILD are ordinal variables. All others are dummy coded categorical variables.  Again, thanks for the response. I tried the HLM software, did not care for it, and just started with Proc GLIMMIX. 

proc GLIMMIX data  = WORK.NEWISLAM;

class COUNTRY FREEBINARY PERFBEL BRELSAL RELPER GENDER AGECATS MARCATS EDUCATS INCATS;

model NDCHLD (descending) = LOGPPP FREEBINAR

PERFBEL BRELSAL RELATTEND RELPER

GENDER AGECATS MARCATS

EDUCATS INCATS SOCLASS CHILD

/ dist=binary link=logit ddfm=bw solution;

random int / subject=COUNTRY solution;

RUN; QUIT;


Super User
Posts: 18,498

GLIMMIX Output Question

Try adding the oddsratio option in the model statement. Let me know if that helps.

proc GLIMMIX data  = WORK.NEWISLAM;

class COUNTRY FREEBINARY PERFBEL BRELSAL RELPER GENDER AGECATS MARCATS EDUCATS INCATS;

model NDCHLD (descending) = LOGPPP FREEBINAR

PERFBEL BRELSAL RELATTEND RELPER

GENDER AGECATS MARCATS

EDUCATS INCATS SOCLASS CHILD

/ dist=binary link=logit ddfm=bw solution oddsratio;

random int / subject=COUNTRY solution;

RUN; QUIT;

Occasional Contributor
Posts: 12

GLIMMIX Output Question

Thanks Again Reeza but I did add odds ratio and with/without issue remains the same. All output, (even fixed effects) are displayed in matrix form as shown below. Just wish I'd get the standard results table as with other regression commands (Proc logistic, GLM, etc.) Thanks again for taking the time. I apperciate it!

                                                 Solutions for Fixed Effects

           Measure

           of

           Perfect

           Belief    Binary                             Respondent'

           vs.       Religious  Religious   Respondent  s Age: 3     Marital   Education  Income                Standard

Effect     Skeptics  Salience   Person?     Gender      Categories   Status    level      Categories  Estimate     Error     DF

Intercept                                                                                               0.5789    0.2787      5

PERFBEL    aSkeptic                                                                                     0.1944   0.07643      5

PERFBEL    bPerfBel                                                                                          0         .      .

BRELSAL              aVeryImp                                                                          -0.1164    0.1538      5

BRELSAL              bNotImp                                                                                 0         .      .

RELATTEND                                                                                             -0.02074  0.008409  10416

RELPER                          aReligious                                                             0.08591   0.06756      5

RELPER                          bNon-Relig                                                                   0         .      .

GENDER                                      aMALE                                                      -0.3295   0.04662      5

GENDER                                      bFEMALE                                                          0         .      .

AGECATS                                                 a15-29                                        -0.01795   0.05986     10

AGECATS                                                 b>50                                          0.001864   0.06272     10

AGECATS                                                 c30-49                                               0         .      .

MARCATS                                                              aMarried                          0.02945   0.06712     10

MARCATS                                                              bOthr                              0.2188    0.1149     10

MARCATS                                                              cNvrMar                                 0         .      .

EDUCATS                                                                        aLow                   -0.08205   0.05243     10

EDUCATS                                                                        bHigh                  -0.06086   0.06146     10

EDUCATS                                                                        cMedium                       0         .      .

INCATS                                                                                    aLow          0.1000   0.04951     10

INCATS                                                                                    bHigh         0.1094   0.05678     10

INCATS                                                                                    cMedium            0         .      .

SOCLASS                                                                                                0.06797   0.02429  10416

CHILD                                                                                                 -0.02411   0.01297  10416

Solution
‎08-26-2011 08:01 AM
Respected Advisor
Posts: 2,655

GLIMMIX Output Question

This is kind of working the long way around, but what about putting the odds ratio and any other results into datasets using ODS output, and then manipulating the datasets to pretty it up to what you need?

Steve Denham

Occasional Contributor
Posts: 12

GLIMMIX Output Question

Thanks so much for the reply. SAS ODS is a very powerful tool, your insights are greatlyappreciated!  

Valued Guide
Valued Guide
Posts: 684

GLIMMIX Output Question

You are not really getting a matrix of odds ratios or parameter estimates. You must be using proc format and informats to generate the detailed labeling.(Do you have a format statement in your code?) It looks like GLIMMIX spreads out the labels for the levels of the class factors. I tried this myself with some data, to confirm what happens with a format statement.  But if you look carefully, you have a single column of parameter estimates, with standard errors, not a matrix of parameters. Note that the last level of each class variable is 0 by definition. Same thing for the odds table that is generated with the oddsratio option.

Be careful in interpreting odds ratios in models with a mixture of class and continuous variables. The GLIMMIX documentation gives a thorough description.

Occasional Contributor
Posts: 12

GLIMMIX Output Question

As with the previous response, THANKS ! so much. Everyone's assistance greatly appreciated.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 475 views
  • 3 likes
  • 4 in conversation