Experimental Design and Inference

Implements a comprehensive suite of experimental designs, both fixed (e.g., block, stratified, matched-pair, cluster, factorial, and mixed-integer-programming-based optimal designs) and sequential (including matching-on-the-fly designs, biased coin designs, and covariate-adaptive urn designs that assign treatment one subject at a time while maintaining covariate balance), for continuous, incidence, count, proportion, survival, and ordinal response types. For each design and response type combination, provides the corresponding inference procedures, including exact, asymptotic, distribution-free, and resampling-based (bootstrap, jackknife, and randomization) methods, so that estimation and testing are always matched to how the data were generated. An 'InferenceSuite' facility runs all applicable inference procedures for a given design and response type at once and reports a single Cauchy-combined p-value summarizing their evidence. A built-in simulation framework supports power analysis and operating-characteristic studies across designs, response types, and inference procedures, with optional parallelization via 'mirai'. Missing covariate data is handled automatically via built-in imputation. Core numerical routines are implemented in C++ via 'Rcpp' for speed on large designs and simulation studies. Machine-specific tuning for optimization is included.


EDI: Experimental Design and Inference EDI hex logo

CRAN R-universe version R-CMD-check R coverage License: GPL v3 DOI

EDI (Experimental Design and Inference) marries experimental designs (fixed and sequential) with inference procedures (exact, asymptotic, and distribution-free) tailored to each design and response type: continuous, incidence, count, proportion, survival with left/right censoring, and ordinal. Designs, inference, and Monte Carlo simulation are exposed as R6 classes; the core estimation and variance-computing kernels are written in C++ (Eigen + LBFGS++) for speed.

Installation

Requires R >= 3.5.0. The quickest route is prebuilt binaries (Linux, macOS, and Windows, no compiler toolchain needed) from Adam Kapelner's R-universe:

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

Not on CRAN yet. A plain install.packages("EDI") fails today — that does not mean the package doesn't exist; use the R-universe call above. EDI has been submitted to CRAN and plain install.packages("EDI") will work once accepted.

Or install the development version straight from GitHub without cloning (requires a C++ compiler toolchain for R packages, e.g. Rtools on Windows, Xcode command line tools on macOS, or r-base-dev on Debian/Ubuntu — this package lives in the R/EDI subdirectory of the repository):

remotes::install_github("kapelner/EDI", subdir = "R/EDI")

Or from a local clone:

# from the repository root
install.packages("R/EDI", repos = NULL, type = "source")

Getting started

library(EDI)
vignette("reproducibility", package = "EDI")      # RNG/seed conventions across designs, bootstrap, and simulation
vignette("extending-edi", package = "EDI")        # writing your own Design/Inference R6 subclasses
vignette("backend-contracts", package = "EDI")    # how the C++ core is shared between the R (Rcpp) and Python (pybind11) bindings
vignette("notation-glossary", package = "EDI")    # symbols/naming conventions shared across Design*/Inference* classes and docs
vignette("validation-evidence", package = "EDI")  # index into the test suite showing each model family computes what it claims

See the repository README for worked examples (fixed and sequential designs, the inference suite, design bakeoffs via SimulationFramework), local performance tuning, and the companion Python package edi_kernels.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.