mdd_DD_simple: Estimate simple did

View source: R/DD_simple.R

mdd_DD_simpleR Documentation

Estimate simple did

Description

Standard two-way FE estimation of a DiD

Usage

mdd_DD_simple(mdd_dat, weights = NULL, cluster = NULL)

Arguments

mdd_dat

An object of class mdd_dat created by mdd_data_format

weights

Weight argument passed to the underlying feols function

cluster

Cluster argument passed to the underlying feols function

See Also

mdd_event_study for the event study.

Examples

## simulate and format data
DID_dat_raw <- sim_dat_common(timing_treatment = 5:10)
DID_dat <- mdd_data_format(DID_dat_raw)

## Estimate DiD
mdd_DD_simple(DID_dat)

## estimate with weights
# add random unit-year specific weights:
DID_dat$wght <- runif(nrow(DID_dat))
mdd_DD_simple(DID_dat, weights=~wght)

MatthieuStigler/multiDiff documentation built on Oct. 21, 2023, 8:13 a.m.