Skip to contents

The fdid function is used to estimate the event study coefficients and the covariance matrix in non-staggered or staggered adoption design. In staggered design, our estimation does not suffer from the so-called negative weighting problem, since we use carefully-chosen non-negative weights to consolidate estimates from each subgroup. See Fang and Liebl (2026) for detailed estimation method.

Usage

fdid(data, treatment)

Arguments

data

a data frame in which the first variable should be the outcome variable, and the latter two variables are time and unit indices. The outcome variable should be numeric.

treatment

a data frame in which the first variable is the unit index; the second variable indicates the reference time, after which the treatment is given, for each unit. NA implies that the unit is never treated. All pre-determined covariates are placed afterwards. Covariates should be numeric.

Value

The fdid function returns a list which includes the estimates of event study coefficients and their covariance. In the output, the event time 0 is considered as the reference period. The output is an object of S3 class "fdid".

References

Fang, C. and Liebl, D. (2026). Making Event Study Plots Honest: A Functional Data Approach to Causal Inference. arXiv:2512.06804.

See also

Examples

data(simulated_stagger_example)
fdid_est <- fdid(data=simulated_stagger_data, treatment=simulated_stagger_treatment)
plot(fdid_est$beta$coef[,2], fdid_est$beta$coef[,1], type="l",
     xlab="Event Time", ylab=expression(hat(beta)), family="Times")