DD_manu_many: Multi-year diff and diff, manually

Description Usage Arguments

View source: R/DiffDiff_manual_byY.R

Description

This function computes the year-to-year Did. This is useful mainly for visualisation, in particular for the pre-trends (settng lag>1), but has no inference for the DiD effect itself.

Usage

1
2
3
4
5
6
7
8
9
DD_manu_many(
  y_var = "y",
  data,
  time.index = "Time",
  treat = "tr",
  unit.index = "unit",
  lag = 1,
  format_long = TRUE
)

Arguments

y_var

The name of the y variable

data

A data frame containing the variables of itnerest, should have names y_var, treat, time.index and unit.index

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).

lag

How many lags to look at? Lag=1 will consider 0_1 sequences, lag 2: 0_1_1 etc

format_long

Should it format in long or wide?


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