IncrementalReducer.counterfactual_minus_baseline#

abstractmethod IncrementalReducer.counterfactual_minus_baseline(delta)[source]#

Return \(\sum_t [\hat{Y}^{\text{cf}}_t - \hat{Y}_t]\).

Parameters:
deltaxr.DataArray

\(\Delta_{t,m}\), the counterfactual-minus-baseline change in the linear-predictor contribution. It carries "sample", "date", the model’s own non-date dimensions and – for the per-channel estimand – "channel", and no dimension order is guaranteed: the per-channel path concatenates along "channel" last, which puts it first, while a panel model’s own dims arrive in the layout the graph produced. Reductions here are by dimension name for exactly that reason. The date coordinates span the evaluation window of a single period.

Returns:
xr.DataArray

Response-scale difference summed over date. The date dimension is dropped; every other dimension is preserved.