Cheat Sheet: Model Inquiry Data Strategy Answer Strategy
Cheat Sheet: Model Inquiry Data Strategy Answer Strategy
Simple dataset with background variables Conditional estimands declare_assignment(m = 100) Difference-in-means
declare_population(N = 100,
declare_estimand( declare_assignment( declare_estimator(
X = rnorm(N))
LATE = mean(Y_Z_1 - Y_Z_0), clusters = villages, Y ~ Z,
subset = complier == TRUE) m = 10) model = difference_in_means)
Two-level dataset
declare_population( DeclareDesign is a software implementation of the MIDA framework, according to which research designs have a Model
schools = of the world, an Inquiry about that model, a Data strategy that generates information about the world, and an Answer
add_level(N = 10,
funding = rnorm(N)), strategy that uses data to make a guess about the Inquiry. Declared designs can be “diagnosed” to calculate the
students = properties of the design such as power and bias using Monte Carlo simulation.
add_level(N = 100,
scores = rnorm(N))
) All declare_* functions return functions. Most functions take a data.frame and return a data.frame.
CC BY SA Graeme Blair, Jasper Cooper, Alexander Coppock, Macartan Humphreys and Neal Fultz • declaredesign.org • Learn more at declaredesign.org/r/DeclareDesign • package version 0.18.0 • Updated: 2019-04