I'm working with a dataset that has two control groups for reasons that I won't get into. I'm trying to do logistic regression on each of those separately - so, cases vs control group 1, then cases vs control group 2. What command do I use within my proc logistic to limit it to one group? Thanks!
How is your data structured?
Assuming you have a variable with three possible values then just use a WHERE clause to eliminate the observations from one of the control groups.
title 'cases vs control group 2';
proc logistics data=....
where group ne 'Control Group 1';
...
title 'cases vs control group 1';
proc logistics data=....
where group ne 'Control Group 2';
...
How is your data structured?
Assuming you have a variable with three possible values then just use a WHERE clause to eliminate the observations from one of the control groups.
title 'cases vs control group 2';
proc logistics data=....
where group ne 'Control Group 1';
...
title 'cases vs control group 1';
proc logistics data=....
where group ne 'Control Group 2';
...
Yes, that worked! I have a variable exactly as you described, and that fixed it. Thank you very much!! 🙂
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.