DifferenceInDifferences#

class causalpy.skl_experiments.DifferenceInDifferences[source]#

Note

There is no pre/post intervention data distinction for DiD, we fit all the data available.

Parameters:
  • data (DataFrame) – A pandas data frame

  • formula (str) – A statistical model formula

  • time_variable_name (str) – Name of the data column for the time variable

  • group_variable_name (str) – Name of the data column for the group variable

  • model – An scikit-learn model for difference in differences

Methods

DifferenceInDifferences.__init__(data, ...)

DifferenceInDifferences.plot([round_to])

Plot results

DifferenceInDifferences.print_coefficients([...])

Prints the model coefficients

DifferenceInDifferences.summary([round_to])

Print text output summarising the results.

Attributes

expt_type

model

outcome_variable_name

__init__(data, formula, time_variable_name, group_variable_name, treated, untreated, model=None, **kwargs)[source]#
Parameters:
__new__(*args, **kwargs)#