-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question on Heteroskedastocity-robust wild boot test #82
Comments
Hi @shpp9212 , good catch! Indeed, you could say that the HC0 type is used for computing the variance-covariance matrices. But then the HC0 vcov matrix is multiplied with a small sample correction of (N-1) / (N-k). So in that sense, I think it is fair to call this HC1, even though the textbook definition of HC1 would be a correction of N / (N-k)? The "31" and "21" types mean: use the HC2/3 type for the dgp, but estimate all variance covariance matrices with the HC1. There is a little bit more background on this in the fwildclusterboot vignette and in the paper by MacKinnon, Nielsen & Webb that it links. It should not be too difficult to also implement "22" and "33" types, I'd be happy about any PR but can eventually also implement this myself if it is of interest =) I hope this helps! |
Hi, Thanks for the comment. I believe (I could be wrong, please let me know) your packages without clustering matches with the following paper's methods. https://www.econ.queensu.ca/sites/econ.queensu.ca/files/qed_wp_1268.pdf I was trying to replicate figure 5 of the paper (page 24), but could not succeed. I believe w3r2, which is superior to w2r2 with respect to test size (close to nominal 0.05 significance level), corresponds to the following code (figure 5 uses HC1) : But what I get is its performance is worse than when I use bootstrap_type='21', which I believe correponds to w2r2. The following is the python code I used. (Sorry I am not very good at coding) If you are familiar with the literature, could you let me know which part of my understanding is wrong? Thank you very much! My code
plot with plotly
|
Very cool! So this suggests that the WRE11 performs better than the '21' and '31' versions? Are you aware of the paper by Flachaire? He benchmarks the '11' vs '22' and '33' bootstraps, which are not implemented in Is there a particular reasons that you are not specifiying the length of Also, I have just open sourced some simulations on the cluster bootstrap here, in case this helps you in any way =) Best, Alex |
Thanks for your suggestions. |
Thanks for the nice words! I could come up with two reasons why your results might differ from MNW: first, they focus on clustered errors, and its not intuitively clear to me why they should translate to non-clustered errors? I guess the next thing I would do is to increase the sample size slightly - I think that MNW pick a sample size significantly higher than that? |
Actually I am refering to another paper, |
Thanks, I was not really aware of this paper. Really cool! One other potential reason for differences: MacKinnon uses equal-tailed pvalues, while |
Beyond that, I am currently running your code with N = 100 as I got a little curious =) I'll look at the MacKinnon figures in more detail tomorrow, I think it is not super straightforward to see if your numbers agree with the paper or not. |
Seems like wildboottest imposes two-tailed pvalues right now. It seems like equal-tailed pvalues also produce a figure similar to two-tailed pvalues, which is mysterious to me. Perhaps I need to read the papers you suggested. Thank you! |
From the MacKinnon paper:
So I think that MacKinnon's simulation do the same thing as the Flachaire paper - they impose the HC corrections on the bootstrap dgp and use the same correction when computing the vcov. I.e. for the w2r2, he imposes the HC2 correction on the bootstrap dgp and computes variance covariance matrices as HC2. So in other words, you are not exactly replicating MacKinnon's paper with the '21' bootstrap type, as he in fact implements a '22' bootstrap type. Adding the '22' to both R or Python is more or less straightforward, and I'd be more than happy about a PR =) Practically, what you would have to do is to add a 'type' argument to the get_tstat() method:
and the same in For resid multipliers, you can take a look at this part of the code. Similar changes would have to be implemented for the get_tboot method. Plus some upstream changes to allow inference of types "22" and "33" =) Would you be interested in implementing this? If yes, I could write a more detailed PR for either the Python or R package =) |
Hi, Thank you for your kind help, I will definitely give it a try. However, I actually think what the paper intended is indeed "21" and "31" in the figure 5 I was concerned with, because in the next paragraph in page 15, it says: |
Hi,
|
Hi, just as a quick catch up - I have been traveling in the last days and will try to take a closer look tomorrow. But at a first glance, it looks right to me! |
Hi,
When clustering is not done and variant = 21 or 31,
I can see that in the data generating process, residuals are transformed accordingly (HC2 or HC3-type)
but are HC2 or HC3 applied to HCCMEs?
To me it seems like for cov estimations, HC0 type is used.
Sorry if I am misunderstanding.
The text was updated successfully, but these errors were encountered: