IncrementalReducer.counterfactual_minus_baseline#
- abstractmethod IncrementalReducer.counterfactual_minus_baseline(delta)[source]#
Return \(\sum_t [\hat{Y}^{\text{cf}}_t - \hat{Y}_t]\).
- Parameters:
- delta
xr.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. Thedatecoordinates span the evaluation window of a single period.
- delta
- Returns:
xr.DataArrayResponse-scale difference summed over
date. Thedatedimension is dropped; every other dimension is preserved.