PanelRegression#
- class causalpy.experiments.panel_regression.PanelRegression[source]#
Panel fixed effects regression with optional within transformation.
Methods
PanelRegression.__init__(data, formula, ...)PanelRegression.effect_summary(**kwargs)Generate a decision-ready summary of causal effects.
PanelRegression.fit(*args, **kwargs)PanelRegression.get_plot_data(*args, **kwargs)Recover the data of an experiment along with the prediction and causal impact information.
Return data with fitted values, residuals, and prediction HDI.
Return data with fitted values and residuals for OLS models.
PanelRegression.plot(*args, **kwargs)Plot the model.
Forest plot of covariate coefficients excluding FE coefficients.
PanelRegression.plot_residuals([kind, by])Residual diagnostic plots.
PanelRegression.plot_trajectories([units, ...])Plot observed vs predicted trajectories for selected units.
Plot distribution of unit fixed effects (dummies only).
PanelRegression.print_coefficients([round_to])Ask the model to print its coefficients.
PanelRegression.summary([round_to])Print summary of panel dimensions and coefficients.
Attributes
idataReturn the InferenceData object of the model.
supports_bayessupports_olslabels- __init__(data, formula, unit_fe_variable, time_fe_variable=None, fe_method='dummies', model=None, **kwargs)[source]#
- classmethod __new__(*args, **kwargs)#