did_panel_data: Prepare data for the DID design with panel data

View source: R/did-data_prep.R

did_panel_dataR Documentation

Prepare data for the DID design with panel data

Description

Prepare data for the DID design with panel data

Usage

did_panel_data(
  var_outcome,
  var_treat,
  var_covars,
  var_cluster,
  id_unit,
  id_time,
  data
)

Arguments

var_outcome

A variable name of the outcome.

var_treat

A variable name of the time-varying treatment.

var_covars

A vector of variables names used as covariates. This should be left as NULL is no covariates are specified in formula.

id_time

A variable name of the time index.

data

A data frame.

Value

A data frame.


naoki-egami/DIDdesign documentation built on June 4, 2024, 2:59 p.m.