Learn R Programming

episensr (version 0.7.1)

selection: Sensitivity analysis to correct for selection bias.

Description

Simple sensitivity analysis to correct for selection bias using estimates of the selection proportions.

Usage

selection(exposed, case, selprob = NULL, alpha = 0.05, dec = 4,
  print = TRUE)

Arguments

exposed
Exposure variable. If a variable, this variable is tabulated against.
case
Outcome variable.
selprob
Numeric vector defining the selection probabilities. This vector has 4 elements between 0 and 1, in the following order:
  1. Selection probability among cases exposed,
  2. Selection probability among cases unexposed,
  3. Selection probabillity
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.
  • corr.dataThe same table corrected for selection proportions.
  • obs.measuresA table of odds ratios and relative risk with confidence intervals.
  • adj.measuresSelection bias corrected measures of outcome-exposure relationship.
  • bias.parmsInput bias parameters: selection probabilities.

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.
selection(matrix(c(136, 107, 297, 165),
dimnames = list(c("UM+", "UM-"), c("Mobile+", "Mobile-")),
nrow = 2, byrow = TRUE),
selprob = c(.94, .85, .64, .25))

Run the code above in your browser using DataLab