diff_diff.DiDResults#
- class diff_diff.DiDResults[source]#
Bases:
objectResults from a Difference-in-Differences estimation.
Provides easy access to coefficients, standard errors, confidence intervals, and summary statistics in a Pythonic way.
Methods
__init__(att, se, t_stat, p_value, conf_int, ...)print_summary([alpha])Print the summary to stdout.
summary([alpha])Generate a formatted summary of the estimation results.
to_dataframe()Convert results to a pandas DataFrame.
to_dict()Convert results to a dictionary.
Attributes
alphabootstrap_distributioncluster_namecoef_varSE / abs(ATT).
coefficientsconley_lag_cutofffitted_valuesinference_methodis_significantCheck if the ATT is statistically significant at the alpha level.
n_bootstrapn_clustersr_squaredresidualssignificance_starsReturn significance stars based on p-value.
survey_metadatavcovvcov_type- __init__(att, se, t_stat, p_value, conf_int, n_obs, n_treated, n_control, alpha=0.05, coefficients=None, vcov=None, residuals=None, fitted_values=None, r_squared=None, inference_method='analytical', n_bootstrap=None, n_clusters=None, bootstrap_distribution=None, survey_metadata=None, vcov_type=None, cluster_name=None, conley_lag_cutoff=None)#
- Parameters:
att (float)
se (float)
t_stat (float)
p_value (float)
n_obs (int)
n_treated (int)
n_control (int)
alpha (float)
vcov (ndarray | None)
residuals (ndarray | None)
fitted_values (ndarray | None)
r_squared (float | None)
inference_method (str)
n_bootstrap (int | None)
n_clusters (int | None)
bootstrap_distribution (ndarray | None)
survey_metadata (Any | None)
vcov_type (str | None)
cluster_name (str | None)
conley_lag_cutoff (int | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)#