Help using Base SAS procedures

PROC Logistic, removing a variable, keeping coefficients the same?

Reply
Occasional Contributor
Posts: 5

PROC Logistic, removing a variable, keeping coefficients the same?

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;

Trusted Advisor
Posts: 2,113

Re: PROC Logistic, removing a variable, keeping coefficients the same?

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.

Ask a Question
Discussion stats
  • 1 reply
  • 181 views
  • 0 likes
  • 2 in conversation