moderndid.diddynamic.DynBalancingResult#
- class moderndid.diddynamic.DynBalancingResult(att: float, var_att: float, mu1: float, mu2: float, var_mu1: float, var_mu2: float, robust_quantile: float, gaussian_quantile: float, gammas: dict, coefficients: dict, imbalances: dict, estimation_params: dict = {})[source]#
Bases:
NamedTupleContainer for dynamic covariate balancing treatment effect estimates.
Stores point estimates, variances, and diagnostic information produced by the dynamic covariate balancing estimator. The average treatment effect is defined as
\[\text{ATE} = \mu_1 - \mu_2\]where \(\mu_1\) and \(\mu_2\) are the potential outcome estimates under the two treatment histories ds1 and ds2.
This class implements the
maketablesplug-in interface for publication-quality tables. See Publication Tables with maketables.- Attributes:
- att
float The ATE point estimate (\(\mu_1 - \mu_2\)).
- var_att
float Variance of the ATE.
- mu1
float Potential outcome estimate under ds1.
- mu2
float Potential outcome estimate under ds2.
- var_mu1
float Variance of mu1.
- var_mu2
float Variance of mu2.
- robust_quantile
float Robust chi-squared critical value for inference.
- gaussian_quantile
float Gaussian critical value for inference.
- gammas
dict Balancing weights per treatment history (keys
'ds1','ds2').- coefficients
dict LASSO coefficients per treatment history.
- imbalances
dict Covariate imbalance measures.
- estimation_params
dict Standard moderndid metadata (observation count, variable names, etc.).
- att
References
[1]Viviano, D. and Bradic, J. (2026). “Dynamic covariate balancing: estimating treatment effects over time with potential local projections.” Biometrika, asag016. https://doi.org/10.1093/biomet/asag016
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
Attributes
The ATE point estimate.
LASSO coefficients per treatment history.
Standard moderndid metadata.
Balancing weights per treatment history.
Gaussian critical value.
Covariate imbalance measures.
Potential outcome estimate under ds1.
Potential outcome estimate under ds2.
Robust chi-squared critical value.
Standard error of the ATE estimate.
Variance of the ATE.
Variance of mu1.
Variance of mu2.