Learn R Programming

tipr (version 0.4.0)

adjust_coef: Adjust an observed regression coefficient for a normally distributed confounder

Description

Adjust an observed regression coefficient for a normally distributed confounder

Usage

adjust_coef(effect, smd, outcome_association, verbose = TRUE)

Arguments

effect

Numeric. Observed exposure - outcome effect from a regression model. This can be the beta coefficient, the lower confidence bound of the beta coefficient, or the upper confidence bound of the beta coefficient.

smd

Numeric. Estimated difference in scaled means between the unmeasured confounder in the exposed population and unexposed population

outcome_association

Numeric. Estimated association between the unmeasured confounder and the outcome.

verbose

Logical. Indicates whether to print informative message. Default: TRUE

Value

Data frame.

Examples

Run this code
# NOT RUN {
## Update an observed coefficient of 0.5 with an unmeasured confounder
## with a difference in scaled means between exposure groups of 0.2
## and coefficient of 0.3
adjust_coef(0.5, 0.2, 0.3)
# }

Run the code above in your browser using DataLab