diff_diff.PanelProfile#

class diff_diff.PanelProfile[source]#

Bases: object

Structural facts about a DiD panel.

Returned by profile_panel(). Mirrors the BusinessContext frozen-dataclass pattern. Consume .to_dict() for a JSON-serializable representation and reason against the bundled llms-autonomous.txt guide.

Methods

__init__(n_units, n_periods, n_obs, ...[, ...])

to_dict()

Return a JSON-serializable dict representation of the profile.

Attributes

outcome_shape

treatment_dose

n_units

n_periods

n_obs

is_balanced

observation_coverage

treatment_type

is_staggered

n_cohorts

cohort_sizes

has_never_treated

has_always_treated

treatment_varies_within_unit

first_treatment_period

last_treatment_period

min_pre_periods

min_post_periods

outcome_dtype

outcome_is_binary

outcome_has_zeros

outcome_has_negatives

outcome_missing_fraction

outcome_summary

alerts

__init__(n_units, n_periods, n_obs, is_balanced, observation_coverage, treatment_type, is_staggered, n_cohorts, cohort_sizes, has_never_treated, has_always_treated, treatment_varies_within_unit, first_treatment_period, last_treatment_period, min_pre_periods, min_post_periods, outcome_dtype, outcome_is_binary, outcome_has_zeros, outcome_has_negatives, outcome_missing_fraction, outcome_summary, alerts, outcome_shape=None, treatment_dose=None)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#