BaseExperiment#
- class causalpy.experiments.base.BaseExperiment[source]#
Base class for quasi experimental designs.
Subclasses should set
_default_model_classto a PyMC model class (e.g.LinearRegression) so thatmodel=Noneinstantiates a sensible Bayesian default. To use an OLS/sklearn model, pass one explicitly.Methods
BaseExperiment.__init__([model])BaseExperiment.effect_summary(*[, window, ...])Generate a decision-ready summary of causal effects.
BaseExperiment.fit(*args, **kwargs)BaseExperiment.get_plot_data(*args, **kwargs)Recover the data of an experiment along with the prediction and causal impact information.
BaseExperiment.get_plot_data_bayesian(*args, ...)Return plot data for Bayesian models.
BaseExperiment.get_plot_data_ols(*args, **kwargs)Return plot data for OLS models.
BaseExperiment.plot(*args, **kwargs)Plot the model.
BaseExperiment.print_coefficients([round_to])Ask the model to print its coefficients.
Attributes
idataReturn the InferenceData object of the model.
labelssupports_bayessupports_ols- __init__(model=None)[source]#
- Parameters:
model (PyMCModel | RegressorMixin | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#