pte_attgt: pte_attgt

View source: R/attgt_functions.R

pte_attgtR Documentation

pte_attgt

Description

pte_attgt takes a "local" data.frame and computes an estimate of a group time average treatment effect and a corresponding influence function. This function generalizes a number of existing methods.

The code relies on this.data having certain variables defined. In particular, there should be an id column (individual identifier), G (group identifier), period (time period), name (equal to "pre" for pre-treatment periods and equal to "post" for post treatment periods), Y (outcome).

In our case, we call pte::two_by_two_subset which sets up the data to have this format before the call to pte_attgt

Usage

pte_attgt(
  gt_data,
  xformla,
  d_outcome = FALSE,
  d_covs_formula = ~-1,
  lagged_outcome_cov = FALSE,
  est_method = "dr",
  ...
)

Arguments

gt_data

data that is "local" to a particular group-time average treatment effect

xformla

one-sided formula for covariates used in the propensity score and outcome regression models

d_outcome

Whether or not to take the first difference of the outcome. The default is FALSE. To use difference-in-differences, set this to be TRUE.

d_covs_formula

A formula for time varying covariates to enter the first estimation step models. The default is not to include any, and, hence, to only include pre-treatment covariats.

lagged_outcome_cov

Whether to include the lagged outcome as a covariate. Default is FALSE.

est_method

Which type of estimation method to use. Default is "dr" for doubly robust. The other option is "reg" for regression adjustment.

...

extra function arguments; not used here

Value

attgt_if


bcallaway11/pte documentation built on Oct. 20, 2023, 3:21 p.m.