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
Simpler way to count observation count of a variable?Hi, I have data similar to the below where I am looking at the products sold in stores over 3 years…
Help with LoopingGood day, Statalist, Please, I am carrying out an analysis for 5 waves of a survey data. Hence I wo…
Why is the output from Graph different on two different computers?I have encountered a very strange issue and I wanted to get the forum's thoughts on what the problem…
Regressions with a fixed time periodHi! I have monthly panel data since 2008. Only 4 variables: year and month, company_id, y, x From …
Estimating ATE for Ordinal Treatment Variable in unbalanced panel dataI am a researcher working at a complicated unbalanced panel set. I would like to bring in reference …
Subscribe to:
Post Comments (Atom)
0 Response to Examples in did2s stata help command
Post a Comment