Learn R Programming

episensr (version 0.7.1)

probsens.conf: Probabilistic sensitivity analysis for unmeasured confounding.

Description

Probabilistic sensitivity analysis to correct for unknown or unmeasurred confounding and random error simultaneously.

Usage

probsens.conf(exposed, case, reps = 1000, prev.exp = list(dist =
  c("constant", "uniform", "triangular", "trapezoidal", "logit-logistic",
  "logit-normal"), parms = NULL), prev.nexp = list(dist = c("constant",
  "uniform", "triangular", "trapezoidal", "logit-logistic", "logit-normal"),
  parms = NULL), risk = list(dist = c("constant", "uniform", "triangular",
  "trapezoidal", "log-logistic", "log-normal"), parms = NULL), corr.p = NULL,
  discard = TRUE, alpha = 0.05, dec = 4, print = TRUE)

Arguments

exposed
Exposure variable. If a variable, this variable is tabulated against.
case
Outcome variable.
reps
Number of replications to run.
prev.exp
List defining the prevalence of exposure among the exposed. The first argument provides the probability distribution function (constant, uniform, triangular, trapezoidal, logit-logistic, or logit-normal) and the second its parameters as a vector:
prev.nexp
List defining the prevalence of exposure among the unexposed.
risk
List defining the confounder-disease relative risk or the confounder-exposure odds ratio. The first argument provides the probability distribution function (constant, uniform, triangular, trapezoidal, log-logistic, or log-normal) and the second its parame
corr.p
Correlation between the exposure-specific confounder prevalences.
discard
A logical scalar. In case of negative adjusted count, should the draws be discarded? If set to FALSE, negative counts are set to zero.
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.
  • obs.measuresA table of observed relative risk and odds ratio with confidence intervals.
  • adj.measuresA table of corrected relative risks and odds ratios.
  • sim.dfData frame of random parameters and computed values.

References

Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.117--150, 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.
set.seed(123)
probsens.conf(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV-"), c("Circ+", "Circ-")), nrow = 2, byrow = TRUE),
reps = 20000,
prev.exp = list("triangular", c(.7, .9, .8)),
prev.nexp = list("trapezoidal", c(.03, .04, .05, .06)),
risk = list("triangular", c(.6, .7, .63)),
corr.p = .8)

Run the code above in your browser using DataLab