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:Kyle Butts [aut, cre], John Gardner [aut], Grant McDermott [ctb], Laurent Berge [ctb]

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.5-any)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

Pkgdown site:https://kylebutts.github.io

Datasets:
  • castle - Data from Cheng and Hoekstra
  • df_het - Simulated data with two treatment groups and heterogenous effects
  • df_hom - Simulated data with two treatment groups and homogenous effects

On CRAN:

7.89 score 96 stars 134 scripts 717 downloads 7 exports 125 dependencies

Last updated 3 months agofrom:bb8be20038. Checks:1 OK, 7 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 08 2025
R-4.5-winNOTEFeb 08 2025
R-4.5-macNOTEFeb 08 2025
R-4.5-linuxNOTEFeb 08 2025
R-4.4-winNOTEFeb 08 2025
R-4.4-macNOTEFeb 08 2025
R-4.3-winNOTEFeb 08 2025
R-4.3-macNOTEFeb 08 2025

Exports:did2sevent_studygen_dataget_honestdid_obj_did2shonest_did_did2splot_event_studysparse_model_matrix

Dependencies:abindbackportsBHbigmemorybigmemory.sriBMiscbootbroomcarcarDatacaretclasscliclockcodetoolscolorspacecorrplotcowplotcpp11data.tableDerivdiagramdiddidimputationdigestdoBydplyrDRDIDdreamerre1071fansifarverfastglmfixestforeachFormulafuturefuture.applygenericsggplot2ggpubrggrepelggsciggsignifglobalsgluegowergridExtragtablehardhatipredisobanditeratorsKernSmoothlabelinglatticelavalifecyclelistenvlme4lubridatemagrittrMASSMatrixMatrixModelsmgcvmicrobenchmarkminqaModelMetricsmodelrmunsellnlmenloptrnnetnumDerivparallellypbapplypbkrtestpillarpkgconfigplyrpolynompROCprodlimprogressrproxypurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackrecipesreformulasreshape2rlangrpartrstatixsandwichscalesshapeSparseMsparsevctrsSQUAREMstaggeredstringistringmagicstringrsurvivaltibbletidyrtidyselecttimechangetimeDatetrusttzdbutf8uuidvctrsviridisLitewithrzoo

Two-Stage Difference-in-Differences

Rendered fromTwo-Stage-Difference-in-Differences.Rmdusingknitr::rmarkdownon Feb 08 2025.

Last update: 2024-06-21
Started: 2021-06-02