Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Using proc logistic in SAS

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 122
Accepted Solution

Using proc logistic in SAS

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

 

 


Accepted Solutions
Solution
‎04-25-2016 05:02 AM
Super User
Posts: 10,028

Re: Using proc logistic in SAS

Posted in reply to juanvg1972

"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


All Replies
Super User
Posts: 10,028

Re: Using proc logistic in SAS

[ Edited ]
Posted in reply to juanvg1972

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.

Frequent Contributor
Posts: 122

Re: Using proc logistic in SAS

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

Solution
‎04-25-2016 05:02 AM
Super User
Posts: 10,028

Re: Using proc logistic in SAS

Posted in reply to juanvg1972

"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 .

 

 

Frequent Contributor
Posts: 92

Re: Using proc logistic in SAS

Posted in reply to juanvg1972

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.

Frequent Contributor
Posts: 122

Re: Using proc logistic in SAS

Thanks very much...., very useful

 

Do you know how to interpret this coeffs?

 

AIC, SC , -2LogL

 

Thanks

Super User
Posts: 10,028

Re: Using proc logistic in SAS

Posted in reply to juanvg1972
That is model goodness-fit statistic. The lower imply the model is better.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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