Programming the statistical procedures from SAS

How to build the multiple logistic regrssion?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

How to build the multiple logistic regrssion?

[ Edited ]

Hi, all,

 

I'm a beginner of SAS. I meet a problem recently. My data is that some events happen on Good (G), Bad (B), Fair (F) dates. If events happen on G, then dependent variable (Y) is (G=1), when others equal 0. If events happen on B, then dependent variable (Y) is (B=1), when others equal 0. I used the code as follows and generated two regrssion results now. However, I need to combine them into only one regression, that is, y is (G=1, B=2). Could anyone give me some suggestions? Thank you very much!!!!!!!

 

proc logistic descending data = logistic_data_dummy;
model Good(Event='1')= Size ROA EMI FSR FAM
Cement Semiconductor HM   Optoelectronic   othElectronic  Financial  Building  Textiles   Network   Trade /RSQ;
title "logistic_FAM";
output out= logistic_Good_FAM;
quit;
run;


proc logistic descending data = logistic_data_dummy;
model Bad(Event='1')= Size ROA EMI FSR FAM
Cement Semiconductor HM Optoelectronic othElectronic Financial Building Textiles Network Trade /RSQ;
title "logistic_FAM";
output out= logistic_Good_FAM;
quit;
run;

 

 


Accepted Solutions
Solution
‎04-06-2016 03:39 AM
Super User
Posts: 9,775

Re: How to build the multiple logistic regrssion?

It is called General Logistic Regression.
SAS can built it by default, no need two individual proc logistic.

I will recode  the response variable as the following due to the order of response variable is very important.

Oh. I just saw your code. You need change your data structure, combine all these f Good (G), Bad (B), Fair (F)
into one variable _Y and recode it as:

 if _Y='Bad'  then Y=1;
 if _Y='Fair' then  Y=2;
 if _Y='Good' then Y=3;


Then build mode as :

model Y= Size ROA EMI FSR FAM
Cement Semiconductor HM   Optoelectronic   othElectronic  Financial  Building  Textiles   Network   Trade /selection=stepwise  RSQ;


View solution in original post


All Replies
Solution
‎04-06-2016 03:39 AM
Super User
Posts: 9,775

Re: How to build the multiple logistic regrssion?

It is called General Logistic Regression.
SAS can built it by default, no need two individual proc logistic.

I will recode  the response variable as the following due to the order of response variable is very important.

Oh. I just saw your code. You need change your data structure, combine all these f Good (G), Bad (B), Fair (F)
into one variable _Y and recode it as:

 if _Y='Bad'  then Y=1;
 if _Y='Fair' then  Y=2;
 if _Y='Good' then Y=3;


Then build mode as :

model Y= Size ROA EMI FSR FAM
Cement Semiconductor HM   Optoelectronic   othElectronic  Financial  Building  Textiles   Network   Trade /selection=stepwise  RSQ;


Occasional Contributor
Posts: 18

Re: How to build the multiple logistic regrssion?

Thank you! It works.
Super User
Posts: 18,569

Re: How to build the multiple logistic regrssion?

The documentation for proc logistic has examples for both ordinal and generalized/nominal logistic regression. 

 

Read over both and decide what will work for you. The main difference is in interpretation not the code. 

 

PS I hope you have a lot of observations, that's a lot of variables to include. 

 

 

Occasional Contributor
Posts: 18

Re: How to build the multiple logistic regrssion?

Thank you! I will try.
☑ This topic is solved.

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

Discussion stats
  • 4 replies
  • 290 views
  • 0 likes
  • 3 in conversation