moderndid.mboot_did#

moderndid.mboot_did(linrep, n_bootstrap=1000, random_state=None)[source]#

Compute multiplier bootstrap for doubly robust DiD estimator using Mammen weights.

Implements the standard multiplier bootstrap for computing doubly robust difference-in-differences estimates using Mammen’s (1993) binary weights. It takes the influence function and applies bootstrap weights to compute bootstrap estimates.

Parameters:
linrepnumpy.ndarray

Influence function of shape (n_units,).

n_bootstrapint, default=1000

Number of bootstrap iterations.

random_stateint | numpy.random.Generator | None, default=None

Controls random number generation for reproducibility.

Returns:
numpy.ndarray

Bootstrap estimates of shape (n_bootstrap,).

References

[1]

Mammen, E. (1993). “Bootstrap and wild bootstrap for high dimensional linear models”. The Annals of Statistics, 21(1), 255-285.