New Contributor
Posts: 4

# Contrast statement in GLIMMIX

I am using GLIMMIX to estimate a mixed model (with random effect for subject) for a binary outcome. My question concerns interpretation of results from a test conducted using the CONTRAST statement (using multiple variables in the contrast statement). I am trying to explain, in simple terms, how this test assesses changes in the predictive ability of the model. I know that in regular logistic models, it essentially assesses the change in the log likelihood estimate of the overall model with vs. without the parameters; however, in GLIMMIX, from what I understand, the log likelihood comparison is not valid (given that they are really only pseudo log likelihoods). A SAS resource (see here) cautions against comparing log likelihood estimates.

The GLIMMIX output for the contrast statement provides a F statistic and p-value. What exactly is being compared across the nested models? In my output, the F-statistic equals the difference in the pseudo log likelihoods, but I thought this was an invalid comparison?

Also, how do I determine the overall statistical significance of the GLIMMIX model? My output gives me the residual log likelihood and the generalized chi-square, but no p-value. Are no significance values given in GLIMMIX models?

Below is an example of the code I am running:

Proc glimmix data=[dataset] method=rspl noclprint oddsratio;

class subject;

model vaccination(event='1') = gender age race income attitude1 attitude2 /dist=bin link=logit solution cl ddfm=none;

contrast 'F test of attitudes' attitude1 1 attitude2 1;

Random int/subject=ego;

ESTIMATE 'male vs female' gender 1 / EXP adjust=sidak;

run;

Posts: 2,655

## Re: Contrast statement in GLIMMIX

Treating attitude1 and attitude2 as continuous variables may be a bit odd; the contrast is essentially whether the value at attitude1=1, attitude2=1 and gender, age, race and income are at their mean values.  I have to ask: what is the mean value of gender or race?  I would reformulate your code as:

proc glimmix data=[dataset] method=quad noclprint oddsratio ic=pq;

class subject gender race attribute1 attribute2;

mdoel vaccination(event='1') = gender age race income attitude1 attitude2 / dist=bin solution cl ddfm=none;

random int/subject=subject;

run;

I don't see where ego enters the model, and this treats all factors except age as nominal.  I also changed the method to adaptive quadrature, so that the analysis is based on quasi-likelihood rather than pseudo-likelihood, thus making the information criteria applicable.  You can now fit a reduced model to check AIC or AICc to see whether the deleted variables contribute to the information density.

Steve Denham

New Contributor
Posts: 4

## Re: Contrast statement in GLIMMIX

Posted in reply to SteveDenham

Thank you for your help! This helps tremendously.

Discussion stats
• 2 replies
• 336 views
• 1 like
• 2 in conversation