Software

I maintain open-source tools that turn econometric methods into documented, auditable research workflows. The main project is cmrdesign, an R and Python package for deciding how a pilot, staged experiment, or A/B-test ramp-up should shape the experiment that follows.

Install

Install from R or Python

R

Current release

install.packages(
  "cmrdesign",
  repos = c(
    "https://juancyamin.r-universe.dev",
    "https://cloud.r-project.org"
  )
)

Development version

remotes::install_github(
  "juancyamin/cmrdesign",
  subdir = "r"
)

Current R package: R-universe.

Python

Current alpha

python -m pip install --pre cmrdesign

Development version

python -m pip install \
"cmrdesign @ git+https://github.com/\
juancyamin/cmrdesign.git\
#subdirectory=python"

Current Python package: PyPI. The Python release is alpha while the API stabilizes.

Coverage

Which function should I use?

The applied functions estimate the uncertainty in pilot variances, solve the CMR design problem, and return allocations that can be realized as integer treatment counts for the main experiment.

DesignFunctionMain inputs
One treatment and one controlcmr_two_arm()y, d
Raw unbounded outcomescmr_unbounded()y, d, psi
Multiple treatments with one controlcmr_multiarm()y, arm, control_arm
Known stratacmr_stratified()y, d, strata, strata_share
Multiple outcomes per unitcmr_multiple_outcomes()outcome matrix y, d, weights
Proxy or delayed primary outcomecmr_proxy()proxy_y, d, bridge constant zeta
Pilot/main-wave sample-size planningcmr_plan()total n, pilot SD guesses
Integer counts from CMR sharesrealize_allocation()a CMR result, n_main

Interpretation

Design, not estimation

cmrdesign is a design package, not a treatment-effect estimator. Its regret certificate describes allocation risk relative to an oracle design; it is not a confidence interval for a treatment effect.

The repository contains software, examples, tests, and documentation. Paper replication code and raw empirical calibration workflows are separate from the package.

Citation

Cite the paper and software

Cite as: Yamin, J. C. (2026). When and How to Pilot: Design Rules for Two-Wave Experiments. arXiv:2607.16982. Software: cmrdesign (R and Python).

BibTeX
@misc{yamin2026pilot,
  title = {When and How to Pilot:
           Design Rules for Two-Wave Experiments},
  author = {Yamin, Juan C.},
  year = {2026},
  doi = {10.48550/arXiv.2607.16982},
  url = {https://arxiv.org/abs/2607.16982}
}

@manual{cmrdesign2026,
  title = {cmrdesign:
           Conditional Minimax Regret Design Rules},
  author = {Yamin, Juan C.},
  year = {2026},
  note = {R and Python software},
  url = {https://juancyamin.github.io/cmrdesign/}
}