build_coords#

causalpy.experiments.model_adapter.build_coords(coeffs, n_obs, *, treated_units=('unit_0',), **extra)[source]#

Build the standard PyMC coordinate dict for regression experiments.

Parameters:
  • coeffs (list[str] | tuple[str, ...]) – Coefficient / predictor names for the coeffs coord.

  • n_obs (int) – Number of observations; used to build obs_ind as np.arange(n_obs).

  • treated_units (tuple[str, ...] | list[str]) – Names for the treated-unit dimension of y.

  • **extra (Any) – Additional coordinate entries merged into the result (e.g. datetime_index for ITS).

Return type:

dict[str, Any]