Closed lparisi94 closed 1 year ago
Hi Luka,
Thanks for the nice words :) I'm super sorry I did not respond earlier, somehow github did not notify my about your question (at least the app didn't, which I checked over the weekend).
In general yes, this should be possible. You would have to do the following:
coef_names <- names(coef(pre_twfe))
multiple_bootstraps <- lapply(coef_name, function(x){
boottest(pre_twfe, param = x, ...)
})
This unfortunately will not run 'straight out of the box' with some nice fixest functionality (e.g. etable) - I might try to come up with a nice workaround for that :)
Note that I have recently added support for fixest's sunab() estimator, you can find the documentation here.
I hope this helps! Maybe I should add a dedicated vignette that runs through fwildclusterboot's DiD support? Do you think that would be helpful?
Best, Alex
Hello Alex,
No worries, thank you for replying and for the useful code and suggestions. The code works, but as you said I can't seem to find an easy way to plot these coefficients - do you maybe have any further tips for that?
Finally, I am not using the Sun & Abraham estimator in my work. My idea is to use the simple twfe (through feols) and compare my findings with the Callaway and Sant'anna DD estimator. A dedicated vignette would sound helpful!
Thank you again!
Best,
Luka
Unfortunately I don't have an ad hoc solution ad hand - you might have to code it up yourself, e.g. with ggplot2::geom_errorbar() for the confidence intervals. I'll think about this a bit. Maybe you can take some inspiration from the plot_event_study()
function from did2s? For getting confidence intervals out of an object of type boottest, you can simply use the confint()
extractor method.
Thank you for all of your good suggestions and help. I will try to implement this and if I have any additional problems I will let you know.
Thanks again!
L.
Hello Alex,
First of all thanks for helping develop all these cool R packages!
I have just one small question, is it possible to use this package to wild cluster my standard errors in an event study?
For example, I'm using the following code:
pre_twfe = feols(log_rate ~ i(stimetotreatment, treatment_group, ref = -1) | scode + year, weights = ~population, data = guns)
I would like to get the correct confidence intervals for each estimate individually. Is this possible?
Any help would be highly appreciated! Thank you.
Best,
Luka