weighted_reg_attgt: weighted_reg_attgt

View source: R/weighted_reg_attgt.R

weighted_reg_attgtR Documentation

weighted_reg_attgt

Description

Takes a "local" data.frame and computes an estimate of a group time average treatment effect and a corresponding influence function.

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

Usage

weighted_reg_attgt(
  gt_data,
  xformla,
  weighting_method = "ps",
  ret_imputations = TRUE,
  ...
)

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

weighting_method

optional argument for type of weights to compute using WeightIt::weightit

ret_imputations

whether or not to return actual and imputed outcomes for the treated group

...

extra function arguments; not used here

Value

attgt_if


bcallaway11/ppe documentation built on April 26, 2023, 6:47 p.m.