gen_a_finish: gen_a_finish

Description Usage Arguments Value Examples

View source: R/gen_a_finish.R

Description

This function will generate a at finish.

Usage

1
gen_a_finish(a_res, my_estimand, wts)

Arguments

a_res

A list of values returned by gen_a_start

my_estimand

"ATE" or "ATT"

wts

A vector of the original weights

Value

a

used to control the strength of the relationship between the omitted variable and the treatment

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(sud)
sud = data.frame(sud)
sud$treat = ifelse(sud$treat == "A", 1, 0)
sud$wts = sample(seq(1, 10, by=.01), size=nrow(sud), replace = TRUE)
outcome_mod = outcome_model(data = sud,
                            weights = "wts",
                            treatment = "treat",
                            outcome = "eps7p_3",
                            model_covariates = c("sfs8p_0"),
                            estimand = "ATE")

start = gen_a_start(y=sud$eps7p_3, tx=sud$treat,
                    residuals=residuals(outcome_mod$mod_results),
                    es = .01,
                    rho = .01,
                    my_estimand = "ATE")

finish = gen_a_finish(a_res = start, my_estimand = "ATE", wts = sud$wts)

OVtool documentation built on Nov. 2, 2021, 9:07 a.m.