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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 1 reply
  • 711 views
  • 0 likes
  • 2 in conversation