Package: lepidoptera Title: Domain-Agnostic Causal Simulation Engine with Mixed Variable Types Version: 0.1.2 Authors@R: person("Danilo", "Sarti", email = "danilosarti@rcsi.ie", role = c("aut", "cre"), comment = c(ORCID = "")) Description: 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) . 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. License: MIT + file LICENSE URL: https://github.com/danilosarti/lepidoptera BugReports: https://github.com/danilosarti/lepidoptera/issues Encoding: UTF-8 Depends: R (>= 4.1.0) Imports: stats Suggests: testthat (>= 3.0.0), igraph, rvinecopulib (>= 0.6.0), jsonlite, yaml, knitr, rmarkdown Config/testthat/edition: 3 RoxygenNote: 7.3.3 VignetteBuilder: knitr NeedsCompilation: no Packaged: 2026-10-28 23:30:12 UTC; root Author: Danilo Sarti [aut, cre] Maintainer: Danilo Sarti Repository: https://cran.r-universe.dev Date/Publication: 2026-10-28 11:40:02 UTC RemoteUrl: https://github.com/cran/lepidoptera RemoteRef: HEAD RemoteSha: 52088561ae98944af19cbe848e6e3786d15861ce