PreTreatmentPlaceboCheck#

class causalpy.checks.pre_treatment_placebo.PreTreatmentPlaceboCheck[source]#

Check that each pre-treatment event-study estimate is near zero.

Wraps the pre-treatment placebo effects already computed by StaggeredDifferenceInDifferences in its result bundle (result.att_event_time). Estimates are judged one event time at a time. A mean of zero produced by cancelling pre-trends is not a pass.

Parameters:

threshold (float) – Two-sided significance level for each pre-treatment estimate. Applied when a row has a usable att_std and n_obs > 1. Stored att_lower / att_upper bounds are compared at this level only when their coverage, read from result.hdi_prob, determines the result. Otherwise that row is not reported as a pass or a fail at threshold. A point estimate with no usable standard error and no interval is not a significance test: threshold is not an absolute tolerance on the ATT.

Methods

PreTreatmentPlaceboCheck.run(experiment, context)

Evaluate pre-treatment event-study ATTs for evidence of pre-trends.

PreTreatmentPlaceboCheck.validate(experiment)

Verify the experiment is a fitted StaggeredDifferenceInDifferences.

Attributes

applicable_methods

__init__(threshold=0.05)[source]#
Parameters:

threshold (float)

Return type:

None

classmethod __new__(*args, **kwargs)#