PersistenceCheck#

class causalpy.checks.persistence.PersistenceCheck[source]#

Check whether the ITS effect persists after the intervention ends.

Wraps InterruptedTimeSeries.analyze_persistence(). Only applicable to three-period ITS designs (with treatment_end_time).

Parameters:
  • hdi_prob (float) – HDI probability (Bayesian models only).

  • direction (Literal['increase', 'decrease', 'two-sided']) – Tail probability direction.

Methods

PersistenceCheck.__init__([hdi_prob, direction])

PersistenceCheck.run(experiment, context)

Run persistence analysis and report whether the effect decays.

PersistenceCheck.validate(experiment)

Verify the experiment is a three-period ITS with treatment_end_time.

Attributes

applicable_methods

__init__(hdi_prob=0.95, direction='increase')[source]#
Parameters:
  • hdi_prob (float)

  • direction (Literal['increase', 'decrease', 'two-sided'])

Return type:

None

classmethod __new__(*args, **kwargs)#