Package: did2s 1.1.0
Kyle Butts
did2s: Two-Stage Difference-in-Differences Following Gardner (2021)
Estimates Two-way Fixed Effects difference-in-differences/event-study models using the approach proposed by Gardner (2021) <doi:10.48550/arXiv.2207.05943>. To avoid the problems caused by OLS estimation of the Two-way Fixed Effects model, this function first estimates the fixed effects and covariates using untreated observations and then in a second stage, estimates the treatment effects.
Authors:
did2s_1.1.0.tar.gz
did2s_1.1.0.zip(r-4.5)did2s_1.1.0.zip(r-4.4)did2s_1.1.0.zip(r-4.3)
did2s_1.1.0.tgz(r-4.4-any)did2s_1.1.0.tgz(r-4.3-any)
did2s_1.1.0.tar.gz(r-4.5-noble)did2s_1.1.0.tar.gz(r-4.4-noble)
did2s_1.1.0.tgz(r-4.4-emscripten)did2s_1.1.0.tgz(r-4.3-emscripten)
did2s.pdf |did2s.html✨
did2s/json (API)
NEWS
# Install 'did2s' in R: |
install.packages('did2s', repos = c('https://kylebutts.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/kylebutts/did2s/issues
Last updated 11 days agofrom:bb8be20038. Checks:OK: 1 NOTE: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 10 2024 |
R-4.5-win | NOTE | Nov 10 2024 |
R-4.5-linux | NOTE | Nov 10 2024 |
R-4.4-win | NOTE | Nov 10 2024 |
R-4.4-mac | NOTE | Nov 10 2024 |
R-4.3-win | NOTE | Nov 10 2024 |
R-4.3-mac | NOTE | Nov 10 2024 |
Exports:did2sevent_studygen_dataget_honestdid_obj_did2shonest_did_did2splot_event_studysparse_model_matrix
Dependencies:abindbackportsBHbigmemorybigmemory.sriBMiscbootbroomcarcarDataclicolorspacecorrplotcowplotcpp11data.tableDerivdiddidimputationdoBydplyrDRDIDdreamerrfansifarverfastglmfixestFormulagenericsggplot2ggpubrggrepelggsciggsignifgluegridExtragtableisobandlabelinglatticelifecyclelme4magrittrMASSMatrixMatrixModelsmgcvmicrobenchmarkminqamodelrmunsellnlmenloptrnnetnumDerivpbapplypbkrtestpillarpkgconfigpolynompurrrquantregR6RColorBrewerRcppRcppArmadilloRcppEigenrlangrstatixsandwichscalesSparseMstaggeredstringistringmagicstringrsurvivaltibbletidyrtidyselecttrustutf8uuidvctrsviridisLitewithrzoo
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Data from Cheng and Hoekstra (2013) | castle |
Simulated data with two treatment groups and heterogenous effects | df_het |
Simulated data with two treatment groups and homogenous effects | df_hom |
Calculate two-stage difference-in-differences following Gardner (2021) | did2s |
Estimate event-study coefficients using TWFE and 5 proposed improvements. | event_study plot_event_study |
Generate TWFE data | gen_data |
get_honestdid_obj_did2s | get_honestdid_obj_did2s |
honest_did_did2s | honest_did_did2s |
Design matrix of a 'fixest' object returned in sparse format | sparse_model_matrix |