Hi All,
I am trying to calculate additional R-Square for each regression variable, like in medical journals (cf. attached file).
Overall R-square is easy to locate, but how to calculate additional R-square for each variable?
Thank you!
I am going to refer you to Paul Allison's webpage on R-square in logistic models (http://www.statisticalhorizons.com/r2logistic). I believe you could calculate an additional Rsquare using Tjur's method (see webpage) by fitting with and without each independent variable. It should be pretty easy to loop through all combinations to get what you are looking for.
Steve Denham
Thank you Steve!
I went through the article and found it really interesting.
So, you suggest to go one by one with the independent variables, and calculate for each of them R^2.
Otherwise, I will get model R^2, not the R^2 for each independent variable....
Not quite. What I think you want is to calculate the values for the full model first. Then calculate the values for the models, deleting each independent variable in turn. The difference between the full model value and the reduced models' values would give the "additional Rsquare" for each independent variable. So, you fit one model with N independent variables, and N models with N-1 independent variables, calculate the positive minus negative proportions for each, and then calculate the change in that value dependent on the independent variable in question. That may be exactly what you were saying and I apologize if I misinterpreted it.
Steve Denham
Somehow I deleted the posts How to restore them???
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.