InterventionTimeEstimator.build_model#

InterventionTimeEstimator.build_model(X, y, coords)[source]#

Defines the PyMC model

Parameters:
  • X – An array of the covariates

  • y – An array of values representing our outcome y

  • coords – Dictionary of named coordinates for PyMC variables (e.g., {“obs_ind”: range(n_obs), “coeffs”: range(n_covariates)}).

Assumes the following attributes are already defined in self:
  • self.timeline: the index of the column in X representing time.

  • self.time_range: a tuple (lower_bound, upper_bound) for the intervention time.

  • self.treatment_effect_type: a dictionary specifying which intervention effects to include and their priors.