BookmarkSubscribeRSS Feed
SvenCrona
Calcite | Level 5

Let's say i do a binary logistic regression with 3 independent variables, and i store predicted probabilities. After that i want to remove one of the independent variables and i want to keep to coefficients for the other variables the same, and get new predicted probabilities. So as to be able to compare the predicted probabilities when the effect of this variable is included or excluded. Is this possible? My code when all 3 independent variables are included is:

proc logistic data=sasuser.outdata descending;

  class var1 var2 var3 / param=ref ;

  model dep_var = var1 var2 var3;

  output out=sasuser.out_pred predprobs=individual;

run;

1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12

with just three variable, the easiest thing might be to compute the expected probabilities for both models in a DATA step.  It's a bit brute force, but is more bulletproof than using the ODS output datasets in IML.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1066 views
  • 0 likes
  • 2 in conversation