Helper functions for using the book Research Design in the Social Sciences: Declaration, Diagnosis, Redesign by Blair, Coppock, and Humphreys 2023 (Princeton University Press).
Installation
Install the released version from CRAN:
install.packages("rdss")or the development version from GitHub:
remotes::install_github("DeclareDesign/rdss")estimator_AS_tidy(), used in the book’s section on experiments over networks, also needs the ‘interference’ package, which is not on CRAN:
remotes::install_github("szonszein/interference")did_multiplegt_tidy(), used in the book’s section on difference-in-differences, needs the ‘polars’ package, which is also not on CRAN:
install.packages("polars", repos = "https://rpolars.r-universe.dev")Example
Each helper fills one step of a declaration in the book, and its help page links to the section that uses it. lag_by_group(), for instance, builds the lagged treatment indicator in the difference-in-differences design: