Datasets and helper functions for the book Research Design in the Social Sciences: Declaration, Diagnosis, and Redesign by Graeme Blair, Alexander Coppock, and Macartan Humphreys (Princeton University Press, 2023). The package website has a Get started article that lists which helpers each section of the book uses.
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, needs the ‘interference’ package, which is not on CRAN. It works only in the GitHub version of rdss, so install both from GitHub:
remotes::install_github("szonszein/interference")
remotes::install_github("DeclareDesign/rdss")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:
