Announcement

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

  • Error 301 for conditional fixed effects negative binomial regression, panel data

    Hello,

    Background

    I have a couple of years' worth of panel data for dengue case counts at the province level in Vietnam (outcome = dengue case counts by province years, offset by provincial populations; n=189 (63 provinces x 3 years)). All my exposures and outcome are continuous variables.

    I am fitting a conditional fixed effects negative binomial regression model to assess the strength of association between exposure socioeconomic variables and the dengue case counts by province-year.

    I have three candidate univariate models taking mobility of population, case counts in the previous year and population density as exposures. The Hausman test suggested random effects model for population density. The models are:
    xtnbreg rmorb mobility, fe exposure(avgpop)
    xtnbreg rmorb prevyearcases, fe exposure(avgpop)
    xtnbreg rmorb popdensity, re exposure(avgpop)


    I used the command estat ic to obtain AIC and BIC numbers, in order to select a preferred model.

    Issue:

    Beyond this, I would like to plot residuals and test for heteroskedasticity.

    However when I try the commands for these (rvfplot and xttest3 respectively), I get error 301 'last estimates not found'.

    Can you help?

    Full code below for info.

    Polly

    CODE:
    import excel socioeconplusspaciotemporaltraining1415INTEGERS.xl sx, cellrange(B2:AH65) firstrow clear
    reshape long rmorb pov clin mobil popdens hpres u1vac elec y1q1nmorb urban, i(provcode) j(year)
    xtset provcode year
    xtnbreg rmorb mobility, fe exposure(avgpop)
    estat ic
    ssc install xttest3

    xttest3 / rvfplot both return error 301

  • #2
    You didn't get a quick response. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    Some diagnostics only work with regress. However, with a reasonably large number of cases then treating counts as continuous is not a bad approach. Many on this listserve recommend considering xtpoisson instead of xtnbreg.

    It is questionable to enter variables one at a time in generating a model. Nothing says a one variable model is the right one. What happens if you include all three rhs variables at once?

    Comment

    Working...
    X