BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
juanvg1972
Pyrite | Level 9

Hi,

 

I am using proc logistic in order to create a logistic regression to predict a var called res1 base in some variables called var1,var2...., var8 ( 8 vars)

 

proc logistic data=test outmodel=modelo plots=ROC ;
class var1 var2 ............... var8;
model res1 =  var1 var2 ............... var8 /* selection=forward */;
quit;

 

I would like to know which is the best way to notice which are the most important variables in my modelo, the vars that have more prediction capacity.  Prior to execute the proc logistic I do a "proc discrim" in order to get the most important vars, but I don't know if is the best way...

 

Also I would like to know if there is anyway to gest the most important vars for the model, the most importance vars for proc logistics. For example in R y do importance(name_of_model)

 

Any advice will be greatly apreciatted

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

"My question is...can I force procc logistic to get only one parameter for variable??"

Sorry. I can't understand what is your mean. If that variable was category variable, maybe you could check EFFECT statement.

Something like. maybe you could try other combination.

proc logistic data=sashelp.class;
class age;
effect new_age=collection(age);
model sex(ref='M')=new_age weight height/clodds=wald;
run;

 

"What output coeficients are good to validate the model?"

About C, as far as I know it is the area under ROC curve. which means it is bigger ,the model is better .

 

 

View solution in original post

6 REPLIES 6
Ksharp
Super User

1)You can check ODDS RATIO of each variable, the most of it has the most power .

2)selection=stepwise , the first one enter the model should be the most important ? Just guess.

 

 

E.X.

proc logistic data=sashelp.class;
model sex(ref='M')=age weight height/clodds=both;
run;

Seems AGE is the most import variable.

juanvg1972
Pyrite | Level 9

Thanks for your help.

 

I have for one variable different parameters in the model depending on the range of value of the variable. That is:

 

estimadores.png

 

My question is...can I force procc logistic to get only one parameter for variable??

 

Other question:

 

What output coeficients are good to validate the model?

 

coefs.png

 

 

 

Thanks in advance?

 

Thanks

Ksharp
Super User

"My question is...can I force procc logistic to get only one parameter for variable??"

Sorry. I can't understand what is your mean. If that variable was category variable, maybe you could check EFFECT statement.

Something like. maybe you could try other combination.

proc logistic data=sashelp.class;
class age;
effect new_age=collection(age);
model sex(ref='M')=new_age weight height/clodds=wald;
run;

 

"What output coeficients are good to validate the model?"

About C, as far as I know it is the area under ROC curve. which means it is bigger ,the model is better .

 

 

Shivi82
Quartz | Level 8

In the below screen your C statistic is very high and ideally it should be more than 0.5 for the model to be fit.

 

Also the concordarnce statistics is robust at 97+ which shows the probability of events where discordance is non event. so in your case you have a very high probability of events.

To check which var are significant or insignificant check the parameter estimate of each independent var & its corresponding p value as well.

juanvg1972
Pyrite | Level 9

Thanks very much...., very useful

 

Do you know how to interpret this coeffs?

 

AIC, SC , -2LogL

 

Thanks

Ksharp
Super User
That is model goodness-fit statistic. The lower imply the model is better.

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!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1568 views
  • 2 likes
  • 3 in conversation