Announcement

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

  • Replicating Bootstrap result in Python / how does xtreg bootstrap with many fixed effects

    Hi Everyone -

    I've been trying to replicate a result with handwritten python and I'm running into a bit of problems replicating the bootstrapped p-value. I've tried pair-wise bootstrapping (bootstrapping the rows), and cross sectional bootstrapping (bootstrapping the people -- it is panel data with a bunch of ids and six observations per person).

    Obviously it isn't going to be exact, but it isn't close (​my p-value is about .08 and stata's is about .06). Here's what I know:

    1. My value is much closer to the uncorrected value
    2. Stata's is closer to the corrected value

    So my question is this: what procedure is stata running when you run:

    xtset ID
    xtreg Dep Var1 i.Category, fe vce(bootstrap, reps(1000))

    And there are many ID values?

    Thanks! Any help would be appreciated!

    Ben

  • #2
    ben:
    welcome to the list.
    The following Stata thread might be useful: http://www.stata.com/support/faqs/st...th-panel-data/
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hey Carlo:

      Thanks for replying. Yeah, I've seen that post before. From what I can tell that corresponds to what I described in my post as a "cross sectional bootstrap". But, perhaps there is a more correct term. Anyhow, my cross sectional approach is about the same as the pair-wise approach and does not match stata's results.

      Ben

      Comment


      • #4
        Ben:
        As per your post#1, it does not seem that a difference of 0.02 in p-value is such a relevant result.
        Perhaps it may be explained by the bootstrap machinery.
        Anyway, it is difficult (for me, at least) to comment on any further without seeing your results.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X