Design & diagnose a randomized experiment (DeclareDesign)
@misc{declaredesign,
title = {DeclareDesign},
author = {Blair and Cooper and Coppock and Humphreys},
howpublished = {\url{https://declaredesign.org/}},
note = {Software / documentation}
}Follow the analysis.
Select a node to explore the method
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))
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
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')
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
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)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
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)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Inputs & data
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')
⚠️ 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.
Discuss the workflow (0)
Log in to join the discussion.