InversePropensityWeighting.get_ate#

InversePropensityWeighting.get_ate(i, idata, method='doubly_robust')[source]#

Compute the Average Treatment Effect for a single posterior sample.

Post-processes the sample posterior distribution for propensity scores, one sample at a time, using the specified weighting method.

Parameters:
  • i (int) – Index of the posterior sample to process.

  • idata (az.InferenceData) – ArviZ InferenceData object containing the posterior samples.

  • method (str, optional) – Weighting scheme to use. One of ‘robust’, ‘raw’, ‘overlap’, or ‘doubly_robust’. Defaults to ‘doubly_robust’.

Returns:

A list of [ate, trt, ntrt] where: - ate: Average Treatment Effect - trt: Weighted mean outcome for treated group - ntrt: Weighted mean outcome for non-treated group

Return type:

list[float]