confounders.emm: Sensitivity analysis to correct for unknown or unmeasured...

Description Usage Arguments Value References Examples

View source: R/confounders.emm.R

Description

Simple sensitivity analysis to correct for unknown or unmeasured confounding in the presence of effect modification. Implementation for ratio measures (relative risk – RR, or odds ratio – OR) and difference measures (risk difference – RD).

Usage

1
2
3
4
5
6
7
confounders.emm(
  case,
  exposed,
  type = c("RR", "OR", "RD"),
  bias_parms = NULL,
  alpha = 0.05
)

Arguments

case

Outcome variable. If a variable, this variable is tabulated against.

exposed

Exposure variable.

type

Choice of implementation, with no effect measure modification for ratio measures (relative risk – RR; odds ratio – OR) or difference measures (risk difference – RD).

bias_parms

Numeric vector defining the 4 necessary bias parameters. This vector has 4 elements, in the following order:

  1. the association between the confounder and the outcome among those who were exposed,

  2. the association between the confounder and the outcome among those who were not exposed,

  3. the prevalence of the confounder among the exposed (between 0 and 1), and

  4. the prevalence of the confounder among the unexposed (between 0 and 1).

alpha

Significance level.

Value

A list with elements:

obs.data

The analyzed 2 x 2 table from the observed data.

cfder.data

The same table for Confounder +.

nocfder.data

The same table for Confounder -.

obs.measures

A table of relative risk with confidence intervals; Total, for Confounder +, and for Confounder -.

adj.measures

A table of Standardized Morbidity Ratio and Mantel-Haenszel estimates.

bias.parms

Input bias parameters.

References

Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.59–78, Springer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# The data for this example come from:
# Tyndall M.W., Ronald A.R., Agoki E., Malisa W., Bwayo J.J., Ndinya-Achola J.O.
# et al.
# Increased risk of infection with human immunodeficiency virus type 1 among
# uncircumcised men presenting with genital ulcer disease in Kenya.
# Clin Infect Dis 1996;23:449-53.
confounders.emm(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")),
nrow = 2, byrow = TRUE),
type = "RR",
bias_parms = c(.4, .7, .8, .05))

confounders.emm(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")),
nrow = 2, byrow = TRUE),
type = "OR",
bias_parms = c(.4, .7, .8, .05))

confounders.emm(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")),
nrow = 2, byrow = TRUE),
type = "RD",
bias_parms = c(-.6, -.3, .8, .05))

episensr documentation built on Aug. 20, 2021, 9:06 a.m.