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 toCheckResult.figuresfor 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 inCheckResult.textwhile 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- classmethod __new__(*args, **kwargs)#