observed_bias_tbl: Create a data frame to assist with creating an observed bias...

Description Usage Arguments Value Examples

View source: R/observed_bias_tbl.R

Description

Create a data frame to assist with creating an observed bias plot

Usage

1
observed_bias_tbl(ps_mod, outcome_mod, drop_list = NULL)

Arguments

ps_mod

Model object for the propensity score model

outcome_mod

Model object for the outcome model

drop_list

Named list of covariates or groups of covariates to drop if NULL, will default to dropping each covariate one at a time.

Value

Data frame with the following columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ps_mod <- glm(am ~ mpg + cyl + I(hp^2), data = mtcars)
outcome_mod <- lm(qsec ~ am + hp + disp + wt, data = mtcars)
observed_bias_tbl(
 ps_mod,
 outcome_mod,
 drop_list = list(
   group_one = c("mpg", "hp"),
   group_two = c("cyl", "wt")
   )
 )

tipr documentation built on Sept. 10, 2021, 9:06 a.m.