Programming the statistical procedures from SAS

two-part models

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

two-part models

The logit model part of a ZIP model models the extra zeros as the outcome, but my client wants the probability of a count greater than 0 instead.  Is it appropriate to do 2 completely separate models - a proc logistic modeling count>0 and a proc genmod with the zeros excluded modeling the count part?

 


Accepted Solutions
Solution
‎08-08-2016 11:53 AM
SAS Super FREQ
Posts: 3,306

Re: two-part models

You can invert odds ratios by using the EVENT= option on the response variable on the MODEL statement.

Instead of 

model y(event="0") = x1 x2 x3;

you can invert the odds ratio by using

model y(event="1") = x1 x2 x3;

 

View solution in original post


All Replies
SAS Super FREQ
Posts: 3,306

Re: two-part models

I think I would stick with the ZIP model. You can use GENMOD or PROC FMM. The model will predict the probability of a zero count, which is P(Y=p | x). The client wants "one minus that predicted probability": 1 - P(Y=0| x)

Contributor
Posts: 25

Re: two-part models

They are more interested in the odds ratios being in the right direction, can I just invert them?

Solution
‎08-08-2016 11:53 AM
SAS Super FREQ
Posts: 3,306

Re: two-part models

You can invert odds ratios by using the EVENT= option on the response variable on the MODEL statement.

Instead of 

model y(event="0") = x1 x2 x3;

you can invert the odds ratio by using

model y(event="1") = x1 x2 x3;

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 205 views
  • 1 like
  • 2 in conversation