untreated_counterfactual#

causalpy.experiments.interactive_fixed_effects.untreated_counterfactual(unit_intercept, time_intercept, loadings, factors)[source]#

Return unit intercept + time intercept + loading-factor product.

Raw factors and raw loadings are not unique. The returned trajectory is the identified product, not a selected-factor reconstruction.

Parameters:
  • unit_intercept (DataArray) – Additive unit intercept. Must include treated_units.

  • time_intercept (DataArray) – Additive time intercept. Must include obs_ind.

  • loadings (DataArray) – Loadings with a factors dimension.

  • factors (DataArray) – Shared factors. Dimensions must be chain, draw, obs_ind, and factors.

Returns:

Untreated counterfactual.

Return type:

xarray.DataArray