Reads a fitted Gaussian mixture as a latent-class structural causal model
and returns the interventional distribution of the free coordinates under
do() of some coordinates, optionally conditioning on others.
Arguments
- g
- do
A length-
pnumeric vector. Coordinates to intervene on take theirdo-value; coordinates not intervened on areNA.- given
A length-
pnumeric vector, orNULL(the default, meaning no conditioning). Coordinates to condition on take their value; coordinates not conditioned on areNA. A coordinate may not appear in bothdoandgiven.- ridge_eps
Tiny ridge added to the conditional covariances for numerical hygiene. Set to
0to disable.
Value
A gmm over the free coordinates (those NA in both do and
given), with weights re-gated by the given evidence only.
Details
Intervened (do) coordinates are set inside every component but do not
re-weight the regime gate – this is the graph surgery that distinguishes
\(p(\cdot \mid do(T = t))\) from \(p(\cdot \mid T = t)\). Conditioned
(given) coordinates re-weight the gate in the usual Bayesian way. Writing
the component prior as \(\pi_k\), the within-component conditional mean as
\(\mu_k\), and the given-coordinate evidence as \(e_k\), the returned
mixture has weights \(\pi_k(given) \propto \pi_k\, e_k\) and per-component
parameters from the Schur conditional on the union of the do and given
coordinates.
For a joint fit over \((Y, T, X)\), gmm_intervene(fit, do = T = 1, given = X = x) is the do-response \(p(Y \mid do(T = 1), X = x)\); its mean
is \(\sum_k \pi_k(x)\, \mu_k^{y \mid 1, x}\), the latent-confounder-mode
interventional mean of proxy_cate.
See also
gmm_counterfactual(), proxy_cate()
Other operators:
gmm_affine(),
gmm_aggregate(),
gmm_convolve(),
gmm_counterfactual(),
gmm_filter(),
gmm_missing(),
gmm_mix(),
gmm_observe(),
gmm_product(),
gmm_reduce()
Other decision:
fit_uplift(),
gmm_cf_mean(),
gmm_cf_tail_prob(),
gmm_cf_variance(),
gmm_counterfactual(),
proxy_cate(),
proxy_confounding_gap(),
proxy_decide(),
proxy_identification_report(),
proxy_overlap(),
proxy_policy_value(),
proxy_predict(),
proxy_regime_segments(),
proxy_retrospective_uplift(),
proxy_uplift(),
uplift_identification(),
uplift_model()
Examples
## Joint (Y, T, X): set T = 1 while conditioning on X = 0.3.
g <- gmm(weights = c(0.5, 0.5),
means = list(c(0, 0, 0), c(2, 1, 1)),
covariances = list(diag(3), diag(3)))
gmm_intervene(g, do = c(NA, 1, NA), given = c(NA, NA, 0.3))
#> <intervene(gmm)>: K = 2 components in p = 1 dimensions
#> [1] w = 0.5498, |mu| = 0.0000, tr(Sigma) = 1.0000
#> [2] w = 0.4502, |mu| = 2.0000, tr(Sigma) = 1.0000