The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

lepidoptera: Domain-Agnostic Causal Simulation Engine with Mixed Variable Types

A domain-agnostic simulation engine for structural causal models with heterogeneous variable types. Users define systems of continuous, categorical, and ordinal features, declare a directed acyclic graph (DAG) over them, attach typed generative mechanisms to each node, and simulate synthetic populations. A pre-built mechanism library covers all nine parent-type/child-type combinations. Vine copula mechanisms estimate full joint dependence from observed data via pair-copula constructions (Bedford and Cooke, 2002) <doi:10.1214/aos/1031689014>. Individual-level counterfactual queries are supported through partial propagation, which freezes unaffected random draws and resamples only the downstream subgraph, enabling individual treatment effect (ITE) estimation alongside population-level average treatment effects (ATE). Any pre-fitted predictive model can serve as a generative mechanism through three wrapper functions. Systems serialise to JSON for cross-language portability with the companion Python package.

Version: 0.1.2
Depends: R (≥ 4.1.0)
Imports: stats
Suggests: testthat (≥ 3.0.0), igraph, rvinecopulib (≥ 0.6.0), jsonlite, yaml, knitr, rmarkdown
Published: 2026-10-28
DOI: 10.32614/CRAN.package.lepidoptera
Author: Danilo Sarti [aut, cre]
Maintainer: Danilo Sarti <danilosarti at rcsi.ie>
BugReports: https://github.com/danilosarti/lepidoptera/issues
License: MIT + file LICENSE
URL: https://github.com/danilosarti/lepidoptera
NeedsCompilation: no
Citation: lepidoptera citation info
Materials: NEWS
CRAN checks: lepidoptera results

Documentation:

Reference manual: lepidoptera.html , lepidoptera.pdf
Vignettes: Getting Started with lepidoptera (source, R code)

Downloads:

Package source: lepidoptera_0.1.2.tar.gz
Windows binaries: r-devel: lepidoptera_0.1.2.zip, r-release: lepidoptera_0.1.2.zip, r-oldrel: lepidoptera_0.1.2.zip
macOS binaries: r-release (arm64): lepidoptera_0.1.2.tgz, r-oldrel (arm64): lepidoptera_0.1.2.tgz, r-release (x86_64): lepidoptera_0.1.2.tgz, r-oldrel (x86_64): lepidoptera_0.1.2.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=lepidoptera to link to this page.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.