Learn R Programming

tipr: R tools for tipping point sensitivity analyses

Authors: Lucy D’Agostino McGowan, Malcolm Barrett License: MIT

Installation

Install the CRAN version

install.packages("tipr")

Or install the development version from GitHub:

# install.packages(devtools)
devtools::install_github("r-causal/tipr")
library(tipr)

Usage

After fitting your model, you can determine the unmeasured confounder needed to tip your analysis. This unmeasured confounder is determined by two quantities, the relationship between the exposure and the unmeasured confounder (if the unmeasured confounder is continuous, this is indicated with exposure_confounder_effect, if binary, with exposed_confounder_prev and unexposed_confounder_prev), and the relationship between the unmeasured confounder and outcome confounder_outcome_effect. Using this

Copy Link

Version

Install

install.packages('tipr')

Monthly Downloads

274

Version

1.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Lucy D'Agostino McGowan

Last Published

February 6th, 2024

Functions in tipr (1.0.2)

observed_bias_tbl

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

Tip an observed odds ratio with a binary confounder.
tip_hr

Tip an observed hazard ratio with a normally distributed confounder.
tip_coef_with_r2

Tip a regression coefficient using the partial R2 for an unmeasured confounder-exposure relationship and unmeasured confounder- outcome relationship
tipr-package

tipr
tip_coef

Tip a linear model coefficient with a continuous confounder.
tip

Tip a result with a normally distributed confounder.
tip_with_binary

Tip a result with a binary confounder.
tip_rr_with_binary

Tip an observed risk ratio with a binary confounder.
exdata_continuous

Example Data (Continuous Outcome)
tip_or

Tip an observed odds ratio with a normally distributed confounder.
tip_hr_with_binary

Tip an observed hazard ratio with a binary confounder.
exdata_rr

Example Data (Risk Ratio)
tip_rr

Tip an observed risk ratio with a normally distributed confounder.
adjust_hr_with_binary

Adjust an observed hazard ratio with a binary confounder
adjust_rr

Adjust an observed risk ratio for a normally distributed confounder
adjust_hr

Adjust an observed hazard ratio for a normally distributed confounder
adjust_coef

Adjust an observed regression coefficient for a normally distributed confounder
adjust_or

Adjust an observed odds ratio for a normally distributed confounder
adjust_coef_with_r2

Adjust a regression coefficient using the partial R2 for an unmeasured confounder-exposure relationship and unmeasured confounder- outcome relationship
e_value

Calculate an E-value
adjust_rr_with_binary

Adjust an observed risk ratio with a binary confounder
adjust_or_with_binary

Adjust an observed odds ratio with a binary confounder
adjust_coef_with_binary

Adjust an observed coefficient from a regression model with a binary confounder
%>%

Pipe operator
observed_bias_tip

Create a data frame to combine with an observed bias data frame demonstrating a hypothetical unmeasured confounder
observed_bias_order

Order observed bias data frame for plotting
observed_covariate_e_value

Calculate the Observed Covariate E-value
r_value

Robustness value