EVinference is an R package for declaring, diagnosing, and analyzing external validity. It implements the M-STOUT framework, allowing researchers to formally specify target populations, mechanisms, and inference strategies—then simulate and evaluate their designs.
The package is intended to be part of a broader R ecosystem that connects to other R packages that we and others have developed.
Installation
The package is currently in development. When released, install from GitHub:
# Install development version from GitHub
devtools::install_github("externalvalidity/EVinference")
# Load the package
library(EVinference)
Usage
library(EVinference)
# Example TBA
Core Functions
Core functions are in final development, but tentatively include functions in the following categories:
declare_*()— for declarations of inference criteriadiagnose_*()— for diagnosing what was declareddesign_*()— for design functions using actual dataanalysis_*()— for analysis functions using actual dataplot_*()— for visualizing diagnostics, diagnoses, and actual inferences
Companion Resources
📚 EVlibrary
Templates for common external validity designs covering theory, design, and analysis.
🎂 causalcakes
Visualize causal mechanisms using "causal cake" diagrams for INUS causation.
🔧 Web Tools
Interactive Shiny applications for external validity analysis without code.