Announcement

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

  • Problem bootstrapping se's in random effects poisson model.

    Dear Stata-listers,

    I am trying to run the Wooldridge 2005* model with correlated random effects. The model runs fine when I estimate using the standard option for analytical standard errors, but when I try to bootstrap the se's, Stata complains about "collinearity in replicate sample is not the same as the full sample, posting missing values".

    When I use the command below, there is no problem. Two of the five year-dummies are dropped due to collinearity.
    xtpoisson $YVAR L.$YVAR $XVARS $XBAR YVAR0 d_year*, re
    ($XBAR adds the means of $XVARS, YVAR0 is the initial value of $YVAR; other macro's have the obvious definitions)

    However, when I bootstrap:
    xtpoisson $YVAR L.$YVAR $XVARS $XBAR YVAR0 d_year*, re vce(bootstrap, reps(250) noi)

    one more year dummy is dropped, and Stata complains about "collinearity in replicate sample is not the same as the full sample, posting missing values". This happens *every* single resampling, and every time the same year dummy is dropped. I have a balanced panel, so it seems unlikely that the sampling makes an unlucky draw every time.

    Could you point me to possible issues to look at? I don't really know where to start looking for a solution…

    Thanks!
    Matthijs

    *(J. Appl. Econ 20: 39-54, 'simple solutions to the initial conditions problem in dynamic nonlienar panel data models with unobserved heterogeneity')




  • #2
    Dear Matthijs (please use your full name as requested in the FAQ #6),

    I am not completely certain about what is going wrong, but I have a good guess and a possible solution. If you want to be completely certain that my solution is correct you may want contact Stata's tech support.
    If you use the bootstrap method in a panel context Stata will automatically clusters over the panel variable. Since you have a balanced panel unlucky draws cannot cause the problems. However, you are also using the lag operator and I think that this is where things go wrong. I think (but I am not certain), that somewhere in the bootstrap procedure something goes wrong with the lag and this is causing some collinearity problems. A workaround for this problem is to create a variable that holds the lag, -gen LYVAR = L.$YVAR-, and use LYVAR instead. Because Stata automatically clusters in a panel context, the lag of a variable should always be included in the sample, so the assumptions for this approach are the same as used under your approach, as far as I can see. Again, if you want to be certain you should ask a Stata representative.
    Best,

    Aljar

    Comment


    • #3
      Great, thanks! I'll contact tech support to be sure, but your solution works.

      Comment


      • #4
        I'm sorry for bumping up an old thread, but I wish to thank Aljar Meesters for his advice. My attempt to bootstrap in panel models has always failed, and I never understood why. Manually generating the lags/leads solved this problem.

        Comment

        Working...
        X