BookmarkSubscribeRSS Feed
stataddict
Calcite | Level 5

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!


Additional R-Square.jpg
4 REPLIES 4
SteveDenham
Jade | Level 19

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

stataddict
Calcite | Level 5

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....

SteveDenham
Jade | Level 19

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

stataddict
Calcite | Level 5

Somehow I deleted the posts Smiley Sad How to restore them???

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 689 views
  • 1 like
  • 2 in conversation