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

Hi
I am looking for a SAS code to fit the logistic regression model for two variables y as the independent variable and x1 and x2, I also need to find the deviance of this model and how can I write the code for expanding the linear predictor to include an interaction term.

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
This gets you started

https://stats.idre.ucla.edu/sas/dae/logit-regression/

To include an interaction term, list it in the model statement with an asterisk between them.

Model outcome = var1 var2 var1*var2;

Another good reference is the documentation, specifically the examples

https://documentation.sas.com/?docsetId=statug&docsetVersion=14.3&docsetTarget=statug_logistic_examp...

View solution in original post

4 REPLIES 4
Reeza
Super User
This gets you started

https://stats.idre.ucla.edu/sas/dae/logit-regression/

To include an interaction term, list it in the model statement with an asterisk between them.

Model outcome = var1 var2 var1*var2;

Another good reference is the documentation, specifically the examples

https://documentation.sas.com/?docsetId=statug&docsetVersion=14.3&docsetTarget=statug_logistic_examp...
shahd
Quartz | Level 8

Thanks. In my code the deviance appears for each observation, What if I need the deviance for the whole model?

Ksharp
Super User

 

proc logistic data=sashelp.class;
model sex=age weight height;
run;

Check Hypothesis for H0: BETA=0

 

 

x.png

 

 

Ksharp
Super User

You mean TWO dependent variables Y ? Check PROC PLS .