did_rcs_data: Prepare data for the DID design with repeated cross-section...

View source: R/did-data_prep.R

did_rcs_dataR Documentation

Prepare data for the DID design with repeated cross-section data

Description

Prepare data for the DID design with repeated cross-section data

Usage

did_rcs_data(
  var_outcome,
  var_treat,
  var_post,
  var_covars = NULL,
  var_cluster = NULL,
  id_time,
  data
)

Arguments

var_outcome

A variable name of the outcome.

var_treat

A variable name of the time-varying treatment.

var_post

A name of a variable to indicate if a unit is observed in the post-treatment periods or not.

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.