setup_pte_basic: Example setup panel treatment effects parameters

View source: R/pte_params.R

setup_pte_basicR Documentation

Example setup panel treatment effects parameters

Description

This is a lightweight (example) function for how to setup the data to be used in the pte package.

setup_pte_basic takes in information about the structure of data and returns a pte_params object. The key piece of information that is computed by this function is the list of groups and list of time periods where ATT(g,t) should be computed. In particular, this function omits the never-treated group but includes all other groups and drops the first time period. This setup is basically geared towards the 2x2 case — i.e., where ATT could be identified with two periods, a treated and untreated group, and the first period being pre-treatment for both groups. This is the relevant case for DID, but is also relevant for other cases as well. However, for example, if more pre-treatment periods were needed, then this function should be replaced by something else.

For code that is written with the idea of being easy-to-use by other researchers, this is a good place to do some error handling / checking that the data is in the correct format, etc.

Usage

setup_pte_basic(
  yname,
  gname,
  tname,
  idname,
  data,
  cband = TRUE,
  alp = 0.05,
  boot_type = "multiplier",
  gt_type = "att",
  ret_quantile = 0.5,
  biters = 100,
  cl = 1,
  ...
)

Arguments

yname

Name of outcome in data

gname

Name of group in data

tname

Name of time period in data

idname

Name of id in data

data

balanced panel data

alp

significance level; default is 0.05

boot_type

which type of bootstrap to use

gt_type

which type of group-time effects are computed. For backward compatiblity, the default choice is "att"

biters

number of bootstrap iterations; default is 100

cl

number of clusters to be used when bootstrapping; default is 1

Value

pte_params object


bcallaway11/pte documentation built on June 6, 2024, 1:41 p.m.