cleverly.longitudinal.PanelLayout#
- class cleverly.longitudinal.PanelLayout(unit: str, time: str, decision_times: tuple[~typing.Any, ...], treatment: tuple[str, ...], baseline: tuple[str, ...], time_varying: tuple[str, ...] = (), censoring: str | None = None, outcome: str | None = None, event: tuple[str, ...] = (), causes: tuple[str, ...] = (), cluster: str | None = None, cluster_labels: tuple[~typing.Any, ...] = (), weights: str | None = None, omitted: tuple[tuple[str, int], ...] = <factory>, treatment_probabilities: tuple[tuple[~typing.Any, str], ...] | None = None, censoring_probabilities: str | None = None)[source]#
The long-panel roles a container was built from.
from_long_panel()records it, andto_long_panel()reads it.- Parameters:
- unit
str The unit identifier column.
- time
str The decision-time column.
- decision_times
tuple The decision-time labels, in node order. Node
tisdecision_times[t - 1].- treatment
tupleofstr The treatment column, or the components of a vector treatment.
- baseline
tupleofstr The unit-level covariates.
- time_varying
tupleofstr The covariates measured at each row before its decision.
- censoring
strorNone The observation indicator column.
- outcome
strorNone The end-of-study outcome column.
- event
tupleofstr The event indicator columns of a survival outcome, one per cause.
- causes
tupleofstr The cause labels of competing risks, else empty.
- cluster
strorNone The cluster identifier column.
- cluster_labels
tuple The cluster identifiers in the order that the container’s cluster codes index.
- weights
strorNone The unit-level weight column.
- omitted
tupleoftupleof(str,int) Each time-varying column and node that the leading run of missing values left out.
- treatment_probabilities
tupleoftupleorNone The
(level, column)pairs of a known treatment mechanism.- censoring_probabilities
strorNone The column of the known retention probabilities.
- unit