# NOT RUN {
## to estimate the association between an unmeasured confounder and outcome
## needed to tip analysis
tip_lm(1.2, smd = -2)
## to estimate the number of unmeasured confounders specified needed to tip
## the analysis
tip_lm(1.2, smd = -2, outcome_association = -0.05)
## Example with broom
if (requireNamespace("broom", quietly = TRUE) &&
requireNamespace("dplyr", quietly = TRUE)) {
lm(wt ~ mpg, data = mtcars) %>%
broom::tidy(conf.int = TRUE) %>%
dplyr::filter(term == "mpg") %>%
dplyr::pull(conf.low) %>%
tip_lm(outcome_association = 2.5)
}
# }
Run the code above in your browser using DataLab