Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Negative Binomial Hurdle model

    Hi everyone,
    I am applying a negative binomial hurdle model and I would like to know what is the command to obtain the marginal effects for each stage, or the command for the joint effect Thanks for your help!

  • #2
    Hi Juan,

    I assum that you are planning to use logit regression for the 1st part to predict 0s and zero-truncated negative binomial regression for the 2nd part to predict positive counts. If that is what you want to do, then you can get marginal effects of each part as follows:
    - For the 1st part, you need to fit a logit model and then use margins command in Stata to compute marginal effects
    Code:
    * 1st part
    logit y i.x1 x2 i.x3
    margins, dydx(*)
    - Similarly for the 2nd part but note that you are using ztnb to predict positive counts, so
    Code:
    * 2nd part
    ztnb y i.x1 x2 i.x3 if y>0
    margins, dydx(*)
    * if you want to compute marginal effects on the conditional mean for the entire sample
    margins, dydx(*) predict(cm) noesample
    where y is your dependent variable, x1 and x3 are binary and x2 is continuous variables. Keep in mind that using factor notation is important when you want to comput marginal effects because Stata will treat binary and continuous variable differently when using margins command. To see more details of margins command, type help margins

    for your second question regarding how to compute joint effects of the two parts, you may use suest test to combine the two parts and to get corrected standard errors, then you may use the expression () option in margins command to obtain overall marginal effetcs.

    hope this helps

    Dung Le

    Comment


    • #3
      Thank you very much for your help Dung

      Comment

      Working...
      X