I would like to run a logistic model in the binary outcome (Y). In the multivariates, I only need the condition 1 and 2. Therefore, I use "and" to select all of them. Am I correct? Or should I use "or"? Thanks.
proc logistic data=test; class Y (ref="1") X1 (ref="2") X2 (ref="2") X3 (ref="2") X4 (ref="2") X5 (ref="2"); model Y = X1 X2 X3 X4 X5; where X1 in (1,2) and X2 in (1,2) and X3 in (1,2) and X3 in (1,2) and X3 in (1,2); run; quit;
x1, x2, x3, x4, x5,
count(*) as n,
when X1 in (1,2) and X2 in (1,2) and X3 in (1,2) and X4 in (1,2) and X5 in (1,2) then "Yes"
else "No" end as included
group by x1, x2, x3, x4, x5;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.