I did a search in Stata, in the help stata command on 'did2s' and try to run their first example (see below). I get an error. I am not sure if there is a problem on my end (maybe my STATA 15.1 is too old and doesn't run it because of this) or is the problem something else. The error I get is nboot() not allowed.
The code I run is:
use https://github.com/kylebutts/did2s_s...ata/df_hom.dta, clear
did2s dep_var, first_stage(i.unit i.year) second_stage(i.rel_year_shift) treatment(treat) cluster(state) nboot(10)
I am ultimately trying to find code that allows me to bootstrap with did2s. I've tried other code as well, but I get an error that says repeated time values within panel. When I check 'duplicates list month_year state', I don't find duplicates.
Any help on bootstrapping with did2s would be appreciated.
Related Posts with Examples in did2s stata help command
Fill null values in an ordered list with repeating valuesHi there. For a data structure like the following, ordered by COMUNA - N_CALLE - NUMN and where repe…
Constructing weekly date when the weeks are determinedHi I have variables for the year, the quarter (taking values from 1 to 4), and the week (taking val…
Diff-in-Diff covariate collinearity issueHi all. I'm running a difference-in-difference model with the new xtdidregress command. When I inclu…
Plotting yearly and monthly data in the same graphHi all, I have two variables. Let's say I observe variable M each month. However, for variable Y, I…
How to save the content of result interface in STATA?When trying to save the content of the results interface of STATA, I found this discussion (https://…
Subscribe to:
Post Comments (Atom)
0 Response to Examples in did2s stata help command
Post a Comment