RegressionKink#

class causalpy.pymc_experiments.RegressionKink[source]#

A class to analyse sharp regression kink experiments.

Parameters:
  • data (DataFrame) – A pandas dataframe

  • formula (str) – A statistical model formula

  • kink_point (float) – A scalar threshold value at which there is a change in the first derivative of the assignment function

  • model – A PyMC model

  • running_variable_name (str) – The name of the predictor variable that the kink_point is based upon

  • epsilon (float) – A small scalar value which determines how far above and below the kink point to evaluate the causal impact.

  • bandwidth (float) – Data outside of the bandwidth (relative to the discontinuity) is not used to fit the model.

Methods

RegressionKink.__init__(data, formula, ...)

RegressionKink.plot([round_to])

Plot the results

RegressionKink.print_coefficients([round_to])

Prints the model coefficients

RegressionKink.summary([round_to])

Print text output summarising the results

Attributes

expt_type

idata

Access to the models InferenceData object

model

__init__(data, formula, kink_point, model=None, running_variable_name='x', epsilon=0.001, bandwidth=inf, **kwargs)[source]#
Parameters:
__new__(*args, **kwargs)#