InterruptedTimeSeries#

class causalpy.skl_experiments.InterruptedTimeSeries[source]#

Interrupted time series analysis, a wrapper around the PrePostFit class

Parameters:
  • data – A pandas data frame

  • treatment_time – The index or time value of when treatment begins

  • formula – A statistical model formula

  • model – An sklearn model object

Methods

InterruptedTimeSeries.__init__(data, ...[, ...])

InterruptedTimeSeries.get_coeffs()

Returns model coefficients

InterruptedTimeSeries.plot([...])

Plot experiment results

InterruptedTimeSeries.plot_coeffs()

Plots coefficient bar plot

InterruptedTimeSeries.print_coefficients([...])

Prints the model coefficients

InterruptedTimeSeries.summary([round_to])

Print text output summarising the results

Attributes

expt_type

model

outcome_variable_name

__init__(data, treatment_time, formula, model=None, **kwargs)#
__new__(*args, **kwargs)#