Programming the statistical procedures from SAS

modeling a response with more than two categories

Reply
Occasional Contributor
Posts: 16

modeling a response with more than two categories

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.

Super User
Posts: 17,745

Re: modeling a response with more than two categories

[ Edited ]

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

 

In fact: 

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

Occasional Contributor
Posts: 16

Re: modeling a response with more than two categories

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

Super User
Posts: 17,745

Re: modeling a response with more than two categories

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.

Occasional Contributor
Posts: 16

Re: modeling a response with more than two categories

Thanks

SAS Employee
Posts: 227

Re: modeling a response with more than two categories

[ Edited ]

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.

Occasional Contributor
Posts: 16

Re: modeling a response with more than two categories

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

SAS Employee
Posts: 227

Re: modeling a response with more than two categories

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.

Occasional Contributor
Posts: 16

Re: modeling a response with more than two categories

Thanks so much!
Ask a Question
Discussion stats
  • 8 replies
  • 251 views
  • 0 likes
  • 3 in conversation