turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- modeling a response with more than two categories

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-20-2017 10:17 PM

Hi SAS community!

I was working on SURVEYLOGISTIC procedure to model some response variables.

In the MODEL statement for categorical responses I used the stetement (event= '2') or (event= '1')

When I have a response with more than 2 categories (like 3 or more and I want to model the response 2 or 3), the event statement doesn't work. I also tried ref and order statements and didn't work. Can someone help me with this please?Thanks.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Maha-Albqoor

07-20-2017 10:40 PM - edited 07-20-2017 10:41 PM

I don't think it lets you do that. You may have to recode it ahead of time

In fact:

The EVENT= option has no effect when there are more than two response categories

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

07-20-2017 11:16 PM

Thank you, how about ORDER=options ...?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Maha-Albqoor

07-20-2017 11:53 PM

It won't combine them AFAIK. PROC LOGISTIC/SURVEYLOGISTIC support multinomial regression. You can consider applying a format and use the formatted value as your EVENT.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

07-21-2017 01:15 AM

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Maha-Albqoor

07-21-2017 11:19 AM - edited 07-21-2017 11:21 AM

It's not clear what you want. If you want to fit a model to a response with 3 levels, then you can do that. But how you do it depends on whether the response levels are logically ordered (like low, medium, high) or not (like red, blue, yellow). If they have no logical order, then add the LINK=GLOGIT option. If they are ordered, you don't need to do anything and an appropriate model is fit by default - just make sure that the response levels are in logical order in the Response Profile table. The ORDER= response variable option might help with that. Examples of both ordered and unordered levels are in the PROC SURVEYLOGISTIC documentation.

If you just want to fit a binary logistic model to two of the three response levels, you can use a WHERE statement to restrict the observations that the procedure sees. For example, if your response, y, has levels 1, 2, and 3, and you want to fit a model to just the observations with levels 2 and 3, then add this WHERE statement in the proc step:

where y in (2,3);

You can then use the EVENT= response variable option if needed.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to StatDave_sas

07-21-2017 02:02 PM

Thank you for the response! actually I don't have a logic order of that variable, WHERE option is not allowed in he research I'm doing (CDC RESTRICTIONS!). I think I will try the LINK=GLOGIT

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Maha-Albqoor

07-21-2017 02:09 PM

Okay, but keep in mind that you will get a model with two separate sets of parameters - one on each of two logits that you are simultaneously modeling. The two logits are log(p1/p3) and log(p2/p3) by default for a response with levels 1, 2, and 3, where p1, p2, and p3 are the probabilities of the response levels.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to StatDave_sas

07-21-2017 07:03 PM

Thanks so much!