API ReferenceEntry

multi_unconfoundedness

multi_unconfoundedness

Reference details for multi_unconfoundedness in causalis.scenarios.

multi_unconfoundedness

Modules
  • dgp
  • model
  • refutation – Refutation utilities for multi-treatment unconfoundedness.
Classes
  • MultiTreatmentIRM – Interactive Regression Model for multi-treatment unconfoundedness.
MultiTreatmentIRM

Bases: BaseEstimator

Interactive Regression Model for multi-treatment unconfoundedness.

DoubleML-style cross-fitting estimator consuming MultiCausalData and producing pairwise ATE contrasts against baseline treatment (column 0). Model supports >= 2 treatments.

Parameters
Functions
coef

Return the estimated coefficient.

Returns
  • ndarray – The estimated coefficient.
confint
data
diagnostics_

Return diagnostic data.

Returns
  • dict – Dictionary containing 'm_hat', 'g_hat' and 'folds'.
estimate
fit
ml_g
ml_m
n_folds
n_rep
normalize_ipw
orth_signal

Return the cross-fitted orthogonal signal (psi_b).

Returns
  • ndarray – The orthogonal signal.
pvalues

Return the p-values for the estimate.

Returns
random_state
score
se

Return the standard error of the estimate.

Returns
sensitivity_analysis
summary

Return a summary DataFrame of the results.

Returns
trimming_rule
trimming_threshold
dgp
Functions
generate_multitreatment_binary_26

Pre-configured multi-treatment dataset with Binary outcome.

  • 3 treatment classes: control + 2 treatments
  • 8 confounders with realistic marginals
  • Binary outcome with logistic-link linear confounding
  • Heterogeneous treatment effects and correlated confounders via Gaussian copula
generate_multitreatment_gamma_26

Pre-configured multi-treatment dataset with Gamma-distributed outcome.

  • 3 treatment classes: control + 2 treatments
  • 8 confounders with realistic marginals
  • Gamma outcome with log-link linear confounding
  • Heterogeneous treatment effects and correlated confounders via Gaussian copula
generate_multitreatment_irm_26
model
Classes
  • MultiTreatmentIRM – Interactive Regression Model for multi-treatment unconfoundedness.
HAS_CATBOOST
MultiTreatmentIRM

Bases: BaseEstimator

Interactive Regression Model for multi-treatment unconfoundedness.

DoubleML-style cross-fitting estimator consuming MultiCausalData and producing pairwise ATE contrasts against baseline treatment (column 0). Model supports >= 2 treatments.

Parameters
Functions
coef

Return the estimated coefficient.

Returns
  • ndarray – The estimated coefficient.
confint
data
diagnostics_

Return diagnostic data.

Returns
  • dict – Dictionary containing 'm_hat', 'g_hat' and 'folds'.
estimate
fit
ml_g
ml_m
n_folds
n_rep
normalize_ipw
orth_signal

Return the cross-fitted orthogonal signal (psi_b).

Returns
  • ndarray – The orthogonal signal.
pvalues

Return the p-values for the estimate.

Returns
random_state
score
se

Return the standard error of the estimate.

Returns
sensitivity_analysis
summary

Return a summary DataFrame of the results.

Returns
trimming_rule
trimming_threshold
refutation

Refutation utilities for multi-treatment unconfoundedness.

Modules
Functions
compute_bias_aware_ci
get_sensitivity_summary
overlap
Modules
Functions
  • plot_m_overlap – Multi-treatment overlap plot for pairwise conditional propensity scores.
  • run_overlap_diagnostics – Run multi-treatment overlap diagnostics from data and estimate.
overlap_plot
Functions
  • overlap_plot – Convenience wrapper to match overlap_plot(data, estimate) API style.
  • plot_m_overlap – Multi-treatment overlap plot for pairwise conditional propensity scores.
overlap_plot

Convenience wrapper to match overlap_plot(data, estimate) API style.

plot_m_overlap

Multi-treatment overlap plot for pairwise conditional propensity scores.

For each comparison baseline (default 0) vs k, this plots P(D=k | X, D in {baseline, k}) = m_k(X) / (m_baseline(X) + m_k(X)) on the observed pair sample D in {baseline, k}, comparing:

  • units with D=k (treated for the pair),
  • units with D=baseline (control for the pair).

Parameters:

  • diag.d: (n, K) one-hot
  • diag.m_hat / diag.m_hat_raw: (n, K) propensity
  • treatment_idx:
    • None -> plot all k != baseline_idx (multi-panel)
    • int -> plot one comparison
    • list[int] -> plot selected comparisons
  • ax: supported only for a single comparison (exactly one k)

Returns matplotlib.figure.Figure.

overlap_validation

Overlap diagnostics for multi-treatment unconfoundedness.

Functions
run_overlap_diagnostics

Run multi-treatment overlap diagnostics from data and estimate.

Diagnostics are computed pairwise between baseline treatment 0 and each active treatment k using pairwise conditional propensity P(D=k | X, D in {0, k}) as the comparison score.

plot_m_overlap

Multi-treatment overlap plot for pairwise conditional propensity scores.

For each comparison baseline (default 0) vs k, this plots P(D=k | X, D in {baseline, k}) = m_k(X) / (m_baseline(X) + m_k(X)) on the observed pair sample D in {baseline, k}, comparing:

  • units with D=k (treated for the pair),
  • units with D=baseline (control for the pair).

Parameters:

  • diag.d: (n, K) one-hot
  • diag.m_hat / diag.m_hat_raw: (n, K) propensity
  • treatment_idx:
    • None -> plot all k != baseline_idx (multi-panel)
    • int -> plot one comparison
    • list[int] -> plot selected comparisons
  • ax: supported only for a single comparison (exactly one k)

Returns matplotlib.figure.Figure.

run_overlap_diagnostics

Run multi-treatment overlap diagnostics from data and estimate.

Diagnostics are computed pairwise between baseline treatment 0 and each active treatment k using pairwise conditional propensity P(D=k | X, D in {0, k}) as the comparison score.

overlap_plot
Functions
  • overlap_plot – Convenience wrapper to match overlap_plot(data, estimate) API style.
  • plot_m_overlap – Multi-treatment overlap plot for pairwise conditional propensity scores.
overlap_plot

Convenience wrapper to match overlap_plot(data, estimate) API style.

plot_m_overlap

Multi-treatment overlap plot for pairwise conditional propensity scores.

For each comparison baseline (default 0) vs k, this plots P(D=k | X, D in {baseline, k}) = m_k(X) / (m_baseline(X) + m_k(X)) on the observed pair sample D in {baseline, k}, comparing:

  • units with D=k (treated for the pair),
  • units with D=baseline (control for the pair).

Parameters:

  • diag.d: (n, K) one-hot
  • diag.m_hat / diag.m_hat_raw: (n, K) propensity
  • treatment_idx:
    • None -> plot all k != baseline_idx (multi-panel)
    • int -> plot one comparison
    • list[int] -> plot selected comparisons
  • ax: supported only for a single comparison (exactly one k)

Returns matplotlib.figure.Figure.

plot_m_overlap

Multi-treatment overlap plot for pairwise conditional propensity scores.

For each comparison baseline (default 0) vs k, this plots P(D=k | X, D in {baseline, k}) = m_k(X) / (m_baseline(X) + m_k(X)) on the observed pair sample D in {baseline, k}, comparing:

  • units with D=k (treated for the pair),
  • units with D=baseline (control for the pair).

Parameters:

  • diag.d: (n, K) one-hot
  • diag.m_hat / diag.m_hat_raw: (n, K) propensity
  • treatment_idx:
    • None -> plot all k != baseline_idx (multi-panel)
    • int -> plot one comparison
    • list[int] -> plot selected comparisons
  • ax: supported only for a single comparison (exactly one k)

Returns matplotlib.figure.Figure.

plot_residual_diagnostics

Plot residual diagnostics for multi-treatment nuisance models.

Panels

1..K. Arm-specific residual-vs-fitted: u_k = y - g_k vs g_k within arm D_k=1. K+1. Binned calibration error for each arm: E[D_k - m_k | m_k in bin] vs binned m_k.

run_overlap_diagnostics

Run multi-treatment overlap diagnostics from data and estimate.

Diagnostics are computed pairwise between baseline treatment 0 and each active treatment k using pairwise conditional propensity P(D=k | X, D in {0, k}) as the comparison score.

run_score_diagnostics

Run score diagnostics for multi-treatment baseline contrasts.

run_unconfoundedness_diagnostics

Run multi-treatment unconfoundedness diagnostics from data and estimate.

This implementation currently supports ATE diagnostics only and computes pairwise balance between baseline treatment 0 and each active treatment k.

score
Modules
  • residual_plots – Residual diagnostic plots for multi-treatment nuisance models g_k and m_k.
  • score_validation – Score diagnostics for multi-treatment unconfoundedness.
Functions
plot_residual_diagnostics

Plot residual diagnostics for multi-treatment nuisance models.

Panels

1..K. Arm-specific residual-vs-fitted: u_k = y - g_k vs g_k within arm D_k=1. K+1. Binned calibration error for each arm: E[D_k - m_k | m_k in bin] vs binned m_k.

residual_plots

Residual diagnostic plots for multi-treatment nuisance models g_k and m_k.

Functions
plot_residual_diagnostics

Plot residual diagnostics for multi-treatment nuisance models.

Panels

1..K. Arm-specific residual-vs-fitted: u_k = y - g_k vs g_k within arm D_k=1. K+1. Binned calibration error for each arm: E[D_k - m_k | m_k in bin] vs binned m_k.

run_score_diagnostics

Run score diagnostics for multi-treatment baseline contrasts.

score_validation

Score diagnostics for multi-treatment unconfoundedness.

Functions
run_score_diagnostics

Run score diagnostics for multi-treatment baseline contrasts.

sensitivity_analysis
sensitivity_benchmark
unconfoundedness
Modules
Functions
compute_bias_aware_ci
get_sensitivity_summary
run_unconfoundedness_diagnostics

Run multi-treatment unconfoundedness diagnostics from data and estimate.

This implementation currently supports ATE diagnostics only and computes pairwise balance between baseline treatment 0 and each active treatment k.

sensitivity
Functions
compute_bias_aware_ci
get_sensitivity_summary
sensitivity_analysis
sensitivity_benchmark
sensitivity_analysis
sensitivity_benchmark
unconfoundedness_validation

Unconfoundedness diagnostics for multi-treatment settings.

Functions
run_unconfoundedness_diagnostics

Run multi-treatment unconfoundedness diagnostics from data and estimate.

This implementation currently supports ATE diagnostics only and computes pairwise balance between baseline treatment 0 and each active treatment k.

validate_unconfoundedness_balance

Convenience wrapper returning the balance block only.

validate_unconfoundedness_balance

Convenience wrapper returning the balance block only.

validate_unconfoundedness_balance

Convenience wrapper returning the balance block only.