Announcement

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

  • Bootstrap Regression with Multiple Fixed Effects

    HI everyone, I've been reading these forums for a few weeks and now it's officially time for my first post.

    I am working on a bootstrap for regressing country GDP against some historical climate data, with fixed effects for country and year. The reason I want to use a bootstrap is to obtain an additional measure of uncertainty beyond the Robust Standard Error provided by the regression command output. My bootstrap command looks like this:

    Code:
    bootstrap, reps(100) seed(1): reg GDP temp##temp precip##precip i.year i.country
    I am noticing that a relatively high percentage (maybe 30-40%) of the bootstrap replications fail. Using the -noisily command, I see the error thrown by Stata is
    collinearity in replicate sample is not the same as the full sample, posting missing values
    I think this is because the fixed effects cannot be estimated for categories that don't exist in the sample (for example, if a given country is not present in the sample then a fixed effect cannot be estimated for that country/sample).
    One approach is to simply extend the number of reps to be ~40% greater and discard the failed replications, but I'm wondering what are the implications of doing this and if it can introduce bias. I'm wondering how big of a deal it would be to do this, from a statistics perspective?

    As a side note, based on other ideas I've seen in this forum, I have already tried modifying the command to use a clustered bootstrap, like so:
    Code:
    bootstrap, reps(100) seed(1) cluster(country) idcluster(newvar): reg GDP temp##temp precip##precip i.year i.newvar
    However, this leads to all bootstrap samples failing, which I notice is due to the additional inclusion of the year fixed effect i.year.

  • #2
    Hayden:
    welcome to this forum.
    You're seemingly dealing with a panel dataset.
    Provided that your regressand is continuous, why not considering -xtreg- first?
    That said, you may want to consider the -bootstrap- option for standard errors (availabe from -xtreg- fro both -fe- and -re- specification) and see if the two types of standard errors are consistent.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X