BookmarkSubscribeRSS Feed
Maha-Albqoor
Fluorite | Level 6

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.

8 REPLIES 8
Reeza
Super User

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

Maha-Albqoor
Fluorite | Level 6

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

Reeza
Super User

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.

StatDave
SAS Super FREQ

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.

Maha-Albqoor
Fluorite | Level 6

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

StatDave
SAS Super FREQ

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.

Maha-Albqoor
Fluorite | Level 6
Thanks so much!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1654 views
  • 0 likes
  • 3 in conversation