Announcement

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

  • Truncated negative binomial model not running/converging

    I am trying to run a truncated negative binomial model using survey data where my dependent variable is hospital discharges. When I run the model specifying the survey data, the model doesn't do anything, even if I leave it to run overnight. (FYI the range of the dependent variable when truncated at 0 is 1 to 17). Code/output:

    svy linearized, subpop(SPD): tnbreg hptotdis i.yearind i.sex i.race i.hispyn i.region i.married ib4.education i.natstat c.pcs ib1.agecat ib4.povcat i.insstat1 if hptotdis>0
    (running tnbreg on estimation sample)


    If I run this a a truncated poisson model, the model works.

    Just to see what would happen, I ran the negative binomial model without the svy specification and found that the model didn't converge.

    Is there something I am doing wrong or is this an indication that a Poisson model is a better fit?

  • #2
    It's an indication that for whatever reason, some of the parameters in the truncated negative binomial model can't be estimated. It could be that one parameter is on the boundary of the parameter space, e.g. a logit intercept going to +/- infinity. It may not mean that the Poisson model is a better fit per se. We can't tell, because the negative binomial model didn't converge.

    You don't report what happens with your iteration log, but I suspect it was iterating forever but the log likelihood wasn't changing, which is often consistent with one parameter being problematic. You can set the maximum number of iterations to just before the point where the actual log likelihood value levels off, e.g.

    Code:
    svy linearized, subpop(SPD): tnbreg hptotdis i.yearind i.sex i.race i.hispyn i.region i.married ib4.education i.natstat c.pcs ib1.agecat ib4.povcat i.insstat1 if hptotdis>0, iterate(30)
    I'm not that familiar with svy estimation, but I do recall that you're better off not using if statements to restrict the population. I recall that you should use the subpop option to restrict the population (i.e. change the subpop variable to include respondents with hospital discharges over zero).
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment

    Working...
    X