Announcement

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

  • xtqreg bootstrap with fixed effects

    Using the Grunfeld data, this runs just fine:

    Code:
    bootstrap, reps(50) cluster(company) idcluster(comp): xtqreg invest mvalue kstock, quantile(.25) i(company)
    But the following does not. (I added i.company#c.time to the dependent variable list.)

    Code:
    bootstrap, reps(50) cluster(company) idcluster(comp): xtqreg invest mvalue kstock i.company#c.time, quantile(.25) i(company)
    I think I understand that the problem is that when bootstrap takes a sample, some clusters are likely to be missing, and so some of the interacted dummy variables are going to be all zeros, and this generates an error.

    Ordinarily Stata automatically omits variables that are all zero. Is there a way for these variables to be omitted in a bootstrap repetition so that the coefficients on the other variables can be stored?

    Thank you.

  • #2
    Hi David
    I think its possible to do that if you use i.comp instead of i.company, both as the absorbed variable (i(company)) and interactions with trend.
    Alternatively, if you can reconstruct the Influence function defined in xtqreg (or also look into mmqreg), you can apply standard Cluster Standard errors, or unconstrained WildBootstrap.
    HTH
    F

    Comment


    • #3
      Thank you, FernandoRios! Changing the interaction to comp instead of company solved the problem!

      Comment

      Working...
      X