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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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