
Estimate the natural preservation "delta" and its E-value
Source:R/taphonomy.R
morie_taphonomy_preservation_delta.RdRecasts a taphonomy question as a treatment-effect estimate: how much of the
observed preservation is attributable to burial processing (the
treatment, e.g. quicklime desiccation), holding environment and
handling fixed, and how strong an unmeasured cause (a "miracle") would need to
be to explain the rest. A thin dispatch over
morie_estimate_irm (DoubleML IRM, cross-fit ATE + SE; default)
or morie_estimate_cate (meta-learner, per-unit heterogeneous
effects) plus morie_e_value. Adds no new statistics.
Arguments
- data
A
data.frameof real comparanda (seemorie_taphonomy_schema). Must be non-empty.- treatment
Binary treatment column (default
"lime_treatment").- outcome
Continuous preservation outcome (default
"preservation_score").- covariates
Character vector of confounder/measurement columns. Defaults to every schema covariate + measurement present in
data.- estimator
"irm"(DoubleML cross-fit ATE with an orthogonal SE; default) or"cate"(meta-learner per-unit effects, summarised to the mean delta, with the full per-unit vector incate_per_unitand its dispersion incate_sd).- se_method
Inference for the
"cate"path only:"none"(default) reports the point estimate +cate_sddispersion with no SE/CI/p-value;"bootstrap"resamples rows and refits the CATE proceduren_boottimes to give a valid SE, percentile CI, and p-value for the mean effect. (sd(tau)/sqrt(n)is deliberately not offered: the per-unit effects are correlated fitted predictions, so it understates the true SE – usecate_sdfor heterogeneity or bootstrap for inference.) Ignored for"irm", which carries its own orthogonal SE.- n_boot
Bootstrap resamples when
se_method = "bootstrap"(default 199).- boot_seed
RNG seed for the bootstrap (default 42).
- ...
Passed to the chosen estimator (e.g.
n_foldsfor IRM,meta_learnerfor CATE).
Value
A named list (RichResult-style; all estimates are
double): value (the preservation delta = ATE / mean CATE),
se, p_value (Wald; NA on the CATE path – no valid SE),
ci_lower, ci_upper, n (integer count),
e_value, e_value_ci, estimator, cate_per_unit
and cate_sd (NULL unless estimator = "cate"), warnings,
and a plain-language interpretation.
Examples
# \donttest{
if (requireNamespace("DoubleML", quietly = TRUE)) {
df <- morie_taphonomy_schema() # fill with REAL comparanda first
# morie_taphonomy_preservation_delta(df)
}
# }