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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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';
...

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

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';
...
gejoachim99
Fluorite | Level 6

Yes, that worked! I have a variable exactly as you described, and that fixed it. Thank you very much!! 🙂

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 528 views
  • 0 likes
  • 2 in conversation