PlaceboInSpace#

class causalpy.checks.placebo_in_space.PlaceboInSpace[source]#

Treat each control unit as if treated and check for spurious effects.

For each control unit, re-fits the synthetic control using the remaining controls as donors. If the placebo effects are as large as the actual effect, the causal claim is weakened.

Parameters:

make_figures (bool) – Attach the MSPE ratio figure to CheckResult.figures for inclusion in generated reports. If no placebo fit produces an MSPE ratio, or no unit has a finite ratio, skip the figure and explain why in CheckResult.text while retaining the statistical results.

Examples

>>> import causalpy as cp
>>> check = cp.checks.PlaceboInSpace()

Methods

PlaceboInSpace.plot_mspe_ratio(check_result, *)

Plot the post/pre MSPE ratio of every unit, treated unit highlighted.

PlaceboInSpace.run(experiment, context)

Treat each control unit as treated and compare effect magnitudes.

PlaceboInSpace.validate(experiment)

Verify the experiment is a SyntheticControl instance.

Attributes

applicable_methods

__init__(*, make_figures=True)[source]#
Parameters:

make_figures (bool)

Return type:

None

classmethod __new__(*args, **kwargs)#