@misc{declaredesign,
title = {DeclareDesign},
author = {Blair and Cooper and Coppock and Humphreys},
howpublished = {\url{https://declaredesign.org/}},
note = {Software / documentation}
}Write the study as a four-tuple — model, inquiry, data strategy, answer strategy — simulate it thousands of times, and read its operating characteristics (bias, power, coverage) before you spend a single observation. The estimand is named, not implied.
Input · what goes in
A planned experiment: sample size, treatment assignment, potential-outcome model, and the estimand you care about.
Show data format & exampleHide example
Format — declare units, potential outcomes, assignment, and the inquiry.
library(DeclareDesign)
des <- declare_model(N=200, potential_outcomes(Y ~ 0.2*Z + U)) +
declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) +
declare_assignment(Z = complete_ra(N)) +
declare_estimator(Y ~ Z, inquiry='ATE')
Pipeline · the recipe ⑂ has parallel branches
↑ Click any step in the diagram to read its logic, code, assumptions & discussion.
Declare the model & potential outcomes
Data preparation — shapes the raw inputs into what the estimator expects.
Define units and the science: each unit's outcomes under treatment and control.
declare_model(N = 200, potential_outcomes(Y ~ 0.2 * Z + U))
- No comments on this step yet — be the first.
Log in to comment on this step.
Difference-in-means estimator
The core estimate — where the causal quantity itself is computed.
Complete randomization → the simple difference in group means is unbiased for the ATE.
declare_estimator(Y ~ Z, .method = difference_in_means, inquiry = 'ATE')
- No comments on this step yet — be the first.
Log in to comment on this step.
Neyman variance & confidence intervals
Uncertainty quantification — standard errors, intervals, and aggregation.
Conservative repeated-sampling variance from the two arms.
lm_robust(Y ~ Z, data = dat)
- No comments on this step yet — be the first.
Log in to comment on this step.
Diagnose: bias, power, coverage
A pre-flight check — run this before trusting any estimate downstream.
Simulate the whole design many times to read its operating characteristics.
diagnose_design(des)
- No comments on this step yet — be the first.
Log in to comment on this step.
Output · what you get
⚠️ Unofficial community showcase of declaredesign. Not affiliated with the authors; all credit to them.
Specify a study as model–inquiry–data–answer, simulate it, and read its diagnosands — bias, power, coverage — before you run it.
Discussion (0)
Log in to join the discussion.