Learn R Programming

episensr (version 0.7.1)

confounders.poly: Sensitivity analysis to correct for unknown or unmeasured polychotomous confounding without effect modification

Description

Simple sensitivity analysis to correct for unknown or unmeasured polychotomous (3-level) confounding without effect modification. Implementation for ratio measures (relative risk -- RR, or odds ratio -- OR) and difference measures (risk difference -- RD).

Usage

confounders.poly(exposed, case, implement = c("RR", "OR", "RD"),
  type = c("RR", "OR", "RD"), p = NULL, RR.cd = NULL, OR.cd = NULL,
  RD.cd = NULL, alpha = 0.05, dec = 4, print = TRUE)

Arguments

exposed
Exposure variable. If a variable, this variable is tabulated against.
case
Outcome variable.
implement
Deprecated. Please use type instead.
type
Choice of implementation, with no effect measure modification for ratio measures (relative risk -- RR; odds ratio -- OR) or difference measures (risk difference -- RD).
p
Numeric vector defining the prevalence of the confounder. This vector has 4 elements between 0 and 1, in the following order:
  1. Prevalence of the highest level confounder among the exposed,
  2. Prevalence of the highest level confounder among th
RR.cd
Vector defining the confounder-disease relative risk. This vector has two elements in the following order:
  1. Relative risk of having the highest-level confounder in diseased, and
  2. Relative risk of having the mid-level confounder in diseased.<
OR.cd
Vector defining the confounder-disease odds ratio. This vector has two elements in the following order:
  1. Odds ratio of having the highest-level confounder in diseased, and
  2. Odds ratio of having the mid-level confounder in diseased.
RD.cd
Vector defining the confounder-disease risk difference. This vector has two elements in the following order:
  1. Risk difference of having the highest-level confounder in diseased, and
  2. Risk difference of having the mid-level confounder in dise
alpha
Significance level.
dec
Number of decimals in the printout.
print
A logical scalar. Should the results be printed?

Value

  • A list with elements:
  • obs.dataThe analysed 2 x 2 table from the observed data.
  • cfder1.dataThe same table for Mid-level Confounder +.
  • cfder2.dataThe same table for Highest-level Confounder +.
  • nocfder.dataThe same table for Confounder -.
  • obs.measuresA table of relative risk with confidence intervals; Total and by confounders.
  • adj.measuresA table of Standardized Morbidity Ratio and Mantel-Haenszel estimates.
  • bias.parmsInput 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

Run this code
# 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.poly(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")),
nrow = 2, byrow = TRUE),
type = "RR",
p = c(.6, .05, .2, .2),
RR.cd = c(.4, .8))
confounders.poly(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")),
nrow = 2, byrow = TRUE),
type = "OR",
p = c(.6, .05, .2, .2),
OR.cd = c(.4, .8))
confounders.poly(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")),
nrow = 2, byrow = TRUE),
type = "RD",
p = c(.6, .05, .2, .2),
RD.cd = c(-.4, -.2))

Run the code above in your browser using DataLab