McCraryDensityTest#
- class causalpy.checks.mccrary.McCraryDensityTest[source]#
Test for manipulation of the running variable at the threshold.
Compares the density of observations just below and just above the treatment threshold using a histogram-based approach.
- Parameters:
Examples
>>> import causalpy as cp >>> check = cp.checks.McCraryDensityTest(n_bins=20)
Methods
McCraryDensityTest.__init__([n_bins, alpha])McCraryDensityTest.run(experiment, context)Test for manipulation of the running variable at the threshold.
McCraryDensityTest.validate(experiment)Verify the experiment is a RegressionDiscontinuity instance.
Attributes
applicable_methods- classmethod __new__(*args, **kwargs)#