View source: R/observed_bias_tbl.R
observed_bias_tbl | R Documentation |
Create a data frame to assist with creating an observed bias plot
observed_bias_tbl(ps_mod, outcome_mod, drop_list = NULL)
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
|
Data frame with the following columns:
dropped
: The covariate or group of covariates that were dropped
type
: Explanation of dropped
, whether it refers to a single covariate (covariate
) or a group of covariates (group
)
ps_formula
: The new formula for the updated propensity score model
outcome_formula
: The new formula for the updated outcome model
ps_model
: The new model object for the updated propensity score model
p
: The updated propensity score
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")
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.