Learn R Programming

episensr (version 0.7.1)

probsens.sel: Probabilistic sensitivity analysis for selection bias.

Description

Probabilistic sensitivity analysis to correct for selection bias.

Usage

probsens.sel(exposed, case, reps = 1000, or.parms = list(dist =
  c("constant", "uniform", "triangular", "trapezoidal", "logit-logistic",
  "logit-normal"), parms = NULL), 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.
or.parms
List defining the selection bias odds. The first argument provides the probability distribution function (constant, uniform, triangular, or trapezoidal) and the second its parameters as a vector:
  1. Constant: constant value,
  2. Uniform: min, max
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 odds ratio with confidence intervals.
  • adj.measuresA table of corrected 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:
# Stang A., Schmidt-Pokrzywniak A., Lehnert M., Parkin D.M., Ferlay J., Bornfeld N. et al.
# Population-based incidence estimates of uveal melanoma in Germany.
# Supplementing cancer registry data by case-control data.
# Eur J Cancer Prev 2006;15:165-70.
set.seed(123)
probsens.sel(matrix(c(136, 107, 297, 165),
dimnames = list(c("Melanoma+", "Melanoma-"), c("Mobile+", "Mobile-")), nrow = 2, byrow = TRUE),
reps = 20000,
or.parms = list("triangular", c(.35, 1.1, .43)))

Run the code above in your browser using DataLab