BookmarkSubscribeRSS Feed
YR
Calcite | Level 5 YR
Calcite | Level 5

I am trying to figure out how to create SAS macro that would possibly loop run logistic regression model multiple times (full model, n-1 predictor models), save the individual probabilities to find out which influential predictors at the observation level

7 REPLIES 7
Reeza
Super User

What part do you need help with?

 

You need to provide more detail of what you're looking for, specifically what you want to capture in each run. 

 

Also, I'm about 75% sure this has been asked on here already and there's a full solution available, I think from Ksharp. I'm not in the mood to search though. 

 

You can also search at Lexjansen.com which will have solutions for this as well. 

 

 

YR
Calcite | Level 5 YR
Calcite | Level 5

My question is two fold:

  1. Am I wright with the assumption that if I run a full model, capturing predicited probabilities at the observation (e.g patient-level), then re-run the model by  removing one of the predictors at a time to evaluate their impact effect and again capture the predicted probabilities; and then compare the full vs interim model probabilites at the observation level I would find out the which predictors are the strongest in driving overall value? 
  2. Is there SAS macro that automates the iterative process of running the models in the loop manner?
Reeza
Super User

1. I have no idea, someone else will be able to answer that 🙂 I haven't heard of this method, but I tend to do more programming than statistics these days. 

2. No, there's no automated method for what you're looking for, however SAS does have several different methods for determined the best model, ie stepwise, forward, backwards, score. See the documentation. Additionally PROC GLMSELECT can be used which supports futher model selection methods. 

 

 

YR
Calcite | Level 5 YR
Calcite | Level 5

I am not looking to build the best model. I have done that part already. Next step is to give the scored data back to the requester so they can use it for the focused interventions. In addition to the predicted value (i.e. score), I would like to say  that customer XYZ's score is largely driven by  variable1, variable5, and variable10. 

SteveDenham
Jade | Level 19

Since the response is the probablility, wouldn't the standardized regression coefficients tell you the relative contributions of the IV's?  I say the standardized coefficients since the IV's may be measured on very different scales.

 

Steve Denham

YR
Calcite | Level 5 YR
Calcite | Level 5

How would you do it at the individual raw data level where you only have the predicted probabilities saved?

SteveDenham
Jade | Level 19

I'm afraid this doesn't make sense to me this morning.  Relative importance depends on the whole dataset.  Perhaps I am missing some key point in your question.

 

Steve Denham

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1518 views
  • 0 likes
  • 3 in conversation