diff_diff.lpdid_results.LPDiDResults#

class diff_diff.lpdid_results.LPDiDResults[source]#

Bases: BaseResults

Results container for the LPDiD estimator.

Holds the per-horizon event_study table and the pooled pre/post table (each a pandas.DataFrame with coefficient, se, t_stat, p_value, conf_low, conf_high, n_obs, n_clusters columns). The headline ATT is the pooled post row.

n_control_units counts never-treated units only (the library-wide field convention, surfaced as “Never-treated units” in summary()); under control_group="clean" the realized control pool at each horizon also includes not-yet-treated cohorts, whose per-horizon counts live in the n_obs / n_clusters columns of the tables.

Methods

__init__(event_study, pooled, n_obs, ...[, ...])

print_summary()

summary()

to_dataframe([level])

to_dict()

Attributes

absorb

alpha

att

cluster_name

conf_int

covariates

dylags

estimand

event_study_df

n_clusters

n_psu

n_strata

non_absorbing

p_value

rank_deficient_action

se

stabilization_window

survey_metadata

t_stat

vcov_type

ylags

event_study

pooled

n_obs

n_treated_units

n_control_units

pre_window

post_window

control_group

reweight

no_composition

pmd

__init__(event_study, pooled, n_obs, n_treated_units, n_control_units, pre_window, post_window, control_group, reweight, no_composition, pmd, alpha=0.05, cluster_name=None, n_clusters=None, vcov_type='hc1', rank_deficient_action='warn', covariates=None, absorb=None, ylags=0, dylags=0, non_absorbing=None, stabilization_window=None, survey_metadata=None, n_strata=None, n_psu=None, event_study_df=None)#
Parameters:
  • event_study (DataFrame | None)

  • pooled (DataFrame | None)

  • n_obs (int)

  • n_treated_units (int)

  • n_control_units (int)

  • pre_window (int)

  • post_window (int)

  • control_group (str)

  • reweight (bool)

  • no_composition (bool)

  • pmd (str | int | None)

  • alpha (float)

  • cluster_name (str | None)

  • n_clusters (int | None)

  • vcov_type (str)

  • rank_deficient_action (str)

  • covariates (List[str] | None)

  • absorb (List[str] | None)

  • ylags (int)

  • dylags (int)

  • non_absorbing (str | None)

  • stabilization_window (int | None)

  • survey_metadata (Any | None)

  • n_strata (int | None)

  • n_psu (int | None)

  • event_study_df (Dict[int, float] | None)

Return type:

None

classmethod __new__(*args, **kwargs)#