Estimate Average Treatment Effect with Bootstrapped CI's

boot_ATE(model, treat, R = 250, block = "", df)

Arguments

model

GLM regression object

treat

Character string for variable to calculate ATE with

R

Integer for number of bootstrap replications

block

Character string for "block" to sample by (cluster robust SE's).

df

Dataframe object of original sample

Value

coefficient from glm object

coefficient from bootstraps

ATE (p1- p0)

RR (p1/p0)

matrix of bootstrap replications

Details

boot_ATE will take a glm regression object and compute predicted outcomes with treatment = 1 and treatment 0; It will then bootstrap the model and compute effects. There is an option for block bootstrapping to compute cluster robust intervals. Bootstrapped confidence intervals are percentile.