Learn R Programming

episensr (version 0.7.1)

probsens: Probabilistic sensitivity analysis.

Description

Probabilistic sensitivity analysis to correct for exposure misclassification or outcome misclassification and random error.

Usage

probsens(exposed, case, type = c("exposure", "outcome"), reps = 1000,
  seca.parms = list(dist = c("constant", "uniform", "triangular",
  "trapezoidal", "logit-logistic", "logit-normal"), parms = NULL),
  seexp.parms = NULL, spca.parms = list(dist = c("constant", "uniform",
  "triangular", "trapezoidal", "logit-logistic", "logit-normal"), parms = NULL),
  spexp.parms = NULL, corr.se = NULL, corr.sp = 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.
type
Choice of correction for exposure or outcome misclassification.
reps
Number of replications to run.
seca.parms
List defining the sensitivity of exposure classification among those with the outcome. The first argument provides the probability distribution function (constant, uniform, triangular, trapezoidal, logit-logistic, or logit-normal) and the second its param
seexp.parms
List defining the sensitivity of exposure classification among those without the outcome.
spca.parms
List defining the specificity of exposure classification among those with the outcome.
spexp.parms
List defining the specifity of exposure classification among those without the outcome.
corr.se
Correlation between case and non-case sensitivities.
corr.sp
Correlation between case and non-case specificities.
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:
# Greenland S., Salvan A., Wegman D.H., Hallock M.F., Smith T.J.
# A case-control study of cancer mortality at a transformer-assembly facility.
# Int Arch Occup Environ Health 1994; 66(1):49-54.
set.seed(123)
# Exposure misclassification, non-differential
probsens(matrix(c(45, 94, 257, 945),
dimnames = list(c("BC+", "BC-"), c("Smoke+", "Smoke-")), nrow = 2, byrow = TRUE),
type = "exposure",
reps = 20000,
seca.parms = list("trapezoidal", c(.75, .85, .95, 1)),
spca.parms = list("trapezoidal", c(.75, .85, .95, 1)))
# Exposure misclassification, differential
probsens(matrix(c(45, 94, 257, 945),
dimnames = list(c("BC+", "BC-"), c("Smoke+", "Smoke-")), nrow = 2, byrow = TRUE),
type = "exposure",
reps = 20000,
seca.parms = list("trapezoidal", c(.75, .85, .95, 1)),
seexp.parms = list("trapezoidal", c(.7, .8, .9, .95)),
spca.parms = list("trapezoidal", c(.75, .85, .95, 1)),
spexp.parms = list("trapezoidal", c(.7, .8, .9, .95)),
corr.se = .8,
corr.sp = .8)
# Disease misclassification
probsens(matrix(c(173, 602, 134, 663),
dimnames = list(c("BC+", "BC-"), c("Smoke+", "Smoke-")), nrow = 2, byrow = TRUE),
type = "outcome",
reps = 20000,
seca.parms = list("uniform", c(.8, 1)),
spca.parms = list("uniform", c(.8, 1)))

Run the code above in your browser using DataLab