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??
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.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.