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.

PanelRegression.get_plot_data_bayesian([...])

Return data with fitted values, residuals, and prediction HDI.

PanelRegression.get_plot_data_ols()

Return data with fitted values and residuals for OLS models.

PanelRegression.input_validation()

PanelRegression.plot(*args, **kwargs)

Plot the model.

PanelRegression.plot_coefficients([...])

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.

PanelRegression.plot_unit_effects([...])

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

idata

Return the InferenceData object of the model.

supports_bayes

supports_ols

labels

__init__(data, formula, unit_fe_variable, time_fe_variable=None, fe_method='dummies', model=None, **kwargs)[source]#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#