BookmarkSubscribeRSS Feed
kb4
Calcite | Level 5 kb4
Calcite | Level 5

Hi Sas community! I am analyzing whether a census-tract level variable (exposure), which is ordinal and has 5 levels, is associated with a binary outcome (outcome), after adjusting for race (racecat), age (agegrp) and clustering by census tract (tract10). My reference category for exposure is 5 and I found significant associations between each lower level of the variable and the reference category of 5. This is the code I used:

 

proc glimmix data=dat;                                                                                  

class tract10 exposure racecat agegrp;

model outcome (event='1') = exposure racecat agegrp/ dist=binary link=logit ddfm=bw solution oddsratio cl;

random intercept / subject=tract10 ;                                                                                                                                                              run; 

 

I have been asked to look into what % variability can be explained by the exposure variable or by the model, but because I can’t use R^2 for this kind of model, I am at a loss. Can anyone provide some guidance on how to answer this question??

1 REPLY 1
StatsMan
SAS Super FREQ

Under a linear regression, the parameter estimates are chosen in such a way to minimize the residual variance.  That minimization gives you the concept of an R**2 statistic, and you can talk about the percentage of variance that a model explains.

 

With a logistic regression, you are calculating the parameter estimates using maximum likelihood.  You are not minimizing a residual variance, hence you don't have a traditional R**2 statistic to fall back on.  Several psuedo-R**2 measures have been proposed in the statistical literature, but I don't know that any universal acceptance has been reached on one measure over another.  

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 723 views
  • 0 likes
  • 2 in conversation