HierarchicalInterruptedTimeSeries.predictive_for_new_unit#

HierarchicalInterruptedTimeSeries.predictive_for_new_unit(size=None, random_seed=None)[source]#

Draw from the population predictive distribution of a new unit’s effect.

For effect_type='instant' returns samples from Normal(mu_lift, sigma_lift); for event-study / placebo variants returns an array shaped (draws, n_bins) from Normal(mu_delta, sigma_delta); for effect_type='saturation' returns an array shaped (draws, 3) with columns [L, k, s] (ceiling lift, half-saturation time, Hill exponent) for a hypothetical new unit.

Parameters:
  • size (int | None) – Number of draws to return. Defaults to the number of available posterior samples.

  • random_seed (int | None) – Seed for the random number generator used to draw from the population-level distribution.

Return type:

ndarray