containers.PanelInputs
utils.scspill_helpers.containers.PanelInputs(
Y0,
Yc,
T0,
X=None,
treated_label,
control_labels,
time_labels,
covariate_names=(),
treated_labels=(),
Yt=None,
)A prepared long panel, split into treated and control outcomes.
Units are ordered treated-first (sorted labels), then the controls in sorted label order – the donor order of the R package’s scspill_prep_X and of every model in scspill.
Attributes
| Name | Type | Description |
|---|---|---|
| Y0 | np.ndarray | Outcome path of the headline treated unit (the first treated label), shape (T,). |
| Yc | np.ndarray | Control-unit outcome matrix, shape (T, N) in control_labels column order. |
| T0 | int | Number of pre-treatment periods (shared by every treated unit). |
| X | np.ndarray or None | Covariate cube (T, N, K) for the control units, or None. |
| treated_label | Any | Label of the headline treated unit. |
| control_labels | tuple | Control labels in column order of Yc. |
| time_labels | np.ndarray | Sorted time labels, length T. |
| covariate_names | tuple of str | Names of the covariate columns stacked into X. |
| treated_labels | tuple | Every treated unit, sorted; defaults to (treated_label,). |
| Yt | np.ndarray | Outcome paths of every treated unit, shape (T, n_treated) in treated_labels column order; defaults to Y0[:, None]. |