adjust_coef {tipr}R Documentation

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_observed,
  exposure_confounder_effect,
  confounder_outcome_effect,
  verbose = getOption("tipr.verbose", TRUE)
)

adjust_coef_with_continuous(
  effect_observed,
  exposure_confounder_effect,
  confounder_outcome_effect,
  verbose = getOption("tipr.verbose", TRUE)
)

Arguments

effect_observed

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.

exposure_confounder_effect

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

confounder_outcome_effect

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

verbose

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

Value

Data frame.

Examples

## 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)

[Package tipr version 1.0.2 Index]