pre_period_score#

causalpy.experiments.interactive_fixed_effects.pre_period_score(predictions_pre, treated_pre)[source]#

Bayesian \(R^2\) of pre-period predictions against pre-period outcomes.

Post-period outcomes are not an argument.

Parameters:
  • predictions_pre (DataArray) – Counterfactual draws on the pre-period.

  • treated_pre (DataArray) – Observed treated outcomes strictly before treatment.

Returns:

unit_{i}_r2 and unit_{i}_r2_std for each treated unit.

Return type:

pandas.Series