lepidoptera:一种与领域无关的因果模拟引擎,支持混合变量类型、Vine Copula 依赖关系及个体层面反事实传播
lepidoptera: A Domain-Agnostic Engine for Causal Simulation with Mixed Variable Types, Vine Copula Dependence, and Individual-Level Counterfactual Propagation
AI总结:
lepidoptera 是支持混合变量类型等的开源因果模拟引擎,可分离 ITE 与 ATE,经三类应用示例验证,为因果模拟提供领域无关工具。
摘要:
lepidoptera 是一个开源的 R 和 Python 包,用于模拟具有异质变量类型的结构因果模型。该包基于类型化机制架构构建,将因果图与每个节点的生成规则分离,并将每个规则公开为可检查、可序列化的对象。预构建的机制库涵盖连续型、分类型和有序型父节点与子节点类型的全部九种组合,无需用户从头实现特定类型的采样。Vine Copula 机制通过 pair-copula 构造和 Rosenblatt 条件模拟算法,从观测数据中估计完整的联合依赖结构,支持二十余种 copula 族。个体层面反事实查询通过部分传播实现,该方法会冻结未受影响节点的随机抽样,仅重放干预的下游后果,从而在无需额外模型假设的情况下,将个体处理效应(ITE)估计量与总体层面平均处理效应(ATE)分离。扩展层允许任何预拟合的预测模型通过统一可调用接口充当生成机制。三个应用示例涵盖临床试验规划、急诊室容量分析和流行病学中介分析,展示了该包的适用范围。
英文摘要:
lepidoptera is an open-source R and Python package for simulation from structural causal models with heterogeneous variable types. The package is built around a typed mechanism architecture, which separates the causal graph from the generating rule at each node and exposes each rule as an inspectable, serialisable object. A pre-built mechanism library covers all nine combinations of continuous, categorical, and ordinal parent and child types, removing the need for users to implement type-specific sampling from scratch. A vine copula mechanism estimates the full joint dependence structure from observed data using pair-copula constructions and the Rosenblatt conditional-simulation algorithm, supporting over twenty copula families. Individual-level counterfactual queries are supported through partial propagation, which freezes the random draws of unaffected nodes and replays only the downstream consequences of an intervention, thereby separating the individual treatment effect (ITE) estimand from the population-level average treatment effect (ATE) without additional model assumptions. An extension layer allows any pre-fitted predictive model to serve as a generative mechanism via a unified callable interface. Three worked illustrations spanning clinical trial planning, emergency-ward capacity analysis, and epidemiological mediation analysis demonstrate the package's scope.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。