# mDid_weights_CH: Weights from Chaisemartin and Hautefeuille In MatthieuStigler/multiDiff: Multi-year diff-diff and FE decompositions

## Description

Weights from Chaisemartin and Hautefeuille

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```mDid_weights_CH( data, y_var = "y", time.index = "Time", treat = "tr", unit.index = "unit", return_details = FALSE ) ## S3 method for class 'FE_weights_CH' print(x, ...) ## S3 method for class 'FE_weights_CH' plot(x, by = c("time", "unit"), ...) weights_CH_smry(data) ```

## Arguments

 `data` A data frame containing the variables of itnerest, should have names `y_var`, `treat`, `time.index` and `unit.index` `y_var` The name of the y variable `time.index` The name of the variable describing the time index (date, year, etc) `treat` The name of the treatment variable. `unit.index` The name of the units (individual, county, household, etc). `return_details` Return additional details on weights? `x` Output from `mDid_weights_CH` `by` Which kind of plot to draw `...` Unused arguments

## Value

A enhanced `tibble` of class FE_weights_CH

w

The weight w_{g,t} as defined in the paper

weight

The weight w multiplied by `obs_weight`. They sum to 1.

obs_weight

The ratio N_{g,t}/N_1, eventually including also the treatment intensity.

## Examples

 ```1 2 3 4 5``` ```examp_df <- data.frame(unit = rep(c(1, 2), each=3), time = rep(1:3, 2), treat = c(0, 0, 1, 0, 1, 1)) mDid_weights_CH(examp_df, treat = "treat", time.index = "time") ```

MatthieuStigler/multiDiff documentation built on Aug. 10, 2021, 9:42 p.m.