PyMCForecastModel.fit#
- PyMCForecastModel.fit(X, y, coords=None)[source]#
Construct and fit the forecasting model on the pre-period.
- Parameters:
X (
DataArray) – Design matrix with dims["obs_ind", "coeffs"]whoseobs_indcoordinate carries the real (datetime or numeric) index. Columns are passed topymc_forecastas covariates; a zero-column design (formula"y ~ 0") fits a covariate-free model.y (
DataArray) – Outcome with dims["obs_ind", "treated_units"]. Must contain exactly one treated unit.coords (
dict[str,Any] |None) – Ignored; the real coordinates are read fromXandy.
- Return type:
InferenceData