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

Dear All

How can i include automatically all possible interaction of main effects to make variable selection?

here the code
proc logistic data=main;
model y/n= a   b   c   d   e  /selection=stepwise slentry=0.10 slstay=0.150 details lackfit;
run;

 

desired consideration:

proc logistic data=main;
model y/n= a   b   c   d   e  a*b   a*c   a*d    a*e    b*c    b*d   b*e   c*d    c*e    d*e /selection=stepwise slentry=0.10 slstay=0.150 details lackfit;
run;

 

Thank you much.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
proc logistic data=sashelp.class;
model sex=age|weight|height @2 ;
run;

View solution in original post

4 REPLIES 4
SAS_Rob
SAS Employee

you can use the | notation with the @ to specify the degree.  For all two way interactions it would be:

 

model y/n= a|b|c|d|e @2 /selection=stepwise slentry=0.10 slstay=0.150 details lackfit;

Ksharp
Super User
proc logistic data=sashelp.class;
model sex=age|weight|height @2 ;
run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 1270 views
  • 0 likes
  • 3 in conversation