MultivarLinearReg.predict#

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

Predict data given input data X.

Overrides the base implementation to reshape y_hat in the returned posterior predictive: the model uses a flattened likelihood (MvNormal on shape (n_obs * n_units, n_outcomes)), so PyMC stores y_hat with that shape. We reshape it back to (obs_ind, treated_units, outcomes) so that the returned InferenceData matches the interface expected by calculate_impact() and ITS (3D y_hat with the same dims as other models).

Caution

Results in KeyError if model hasn’t been fit.

Parameters: