ETWFERegression.predict#

ETWFERegression.predict(X=None, coords=None, out_of_sample=False, **kwargs)[source]#

Return the in-sample posterior predictive computed during fit().

ETWFE is an in-sample estimator: the saturated design is defined only over the observed panel cells. Rather than re-running pymc.sample_posterior_predictive() against a new design, this returns the draws already generated by fit(). Because mu carries dims ["obs_ind", "treated_units"], PyMCModel.score() and the downstream impact machinery work unchanged.

Parameters:
  • X (DataArray | None) – Ignored; accepted for API compatibility.

  • coords (dict[str, Any] | None) – Ignored; accepted for API compatibility.

  • out_of_sample (bool | None) – Ignored; accepted for API compatibility.

  • **kwargs (Any) – Ignored; accepted for API compatibility with PyMCModel.predict().

Returns:

InferenceData with only a posterior_predictive group.

Return type:

arviz.InferenceData

Raises:

RuntimeError – If the model has not been fit.