MyNixOS website logo
Description

Basic Sensitivity Analysis of Epidemiological Results.

Basic sensitivity analysis of the observed relative risks adjusting for unmeasured confounding and misclassification of the exposure/outcome, or both. It follows the bias analysis methods and examples from the book by Lash T.L, Fox M.P, and Fink A.K. "Applying Quantitative Bias Analysis to Epidemiologic Data", ('Springer', 2021).

episensr

R-CMD-check CRAN_Status_Badge DOI Codecov testcoverage Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. Total CRANdownloads

The R package episensr allows to do basic sensitivity analysis of epidemiological results as described in Applying Quantitative Bias Analysis to Epidemiological Data by Timothy L. Lash, Matthew P. Fox, and Aliza K. Fink (ISBN: 978-0-387-87960-4, bias.analysis).

License

This package is free and open source software, licensed under GPL2.

Citation

To cite episensr, please use:

citation("episensr")
#> To cite package 'episensr' in publications use:
#> 
#>   Haine, Denis (2023). The episensr package: basic sensitivity analysis
#>   of epidemiological results. R package version 1.3.0.
#>   https://dhaine.github.io/episensr/. doi: 10.5281/zenodo.8299430.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Misc{,
#>     title = {The episensr package: basic sensitivity analysis of epidemiological results},
#>     author = {Denis Haine},
#>     year = {2023},
#>     note = {R package version 1.3.0},
#>     doi = {10.5281/zenodo.8299430},
#>     url = {https://dhaine.github.io/episensr/},
#>   }

Example

We will use a case-control study by Stang et al. on the relation between mobile phone use and uveal melanoma. The observed odds ratio for the association between regular mobile phone use vs. no mobile phone use with uveal melanoma incidence is 0.71 [95% CI 0.51-0.97]. But there was a substantial difference in participation rates between cases and controls (94% vs 55%, respectively) and so selection bias could have an impact on the association estimate. The 2X2 table for this study is the following:

regular useno use
cases136107
controls297165

We use the function selection as shown below.

library(episensr)
#> Loading required package: ggplot2
#> Thank you for using episensr!
#> This is version 1.3.0 of episensr
#> Type 'citation("episensr")' for citing this R package in publications.

selection(matrix(c(136, 107, 297, 165),
                 dimnames = list(c("UM+", "UM-"), c("Mobile+", "Mobile-")),
                 nrow = 2, byrow = TRUE),
          bias_parms = c(.94, .85, .64, .25))
#> --Observed data-- 
#>          Outcome: UM+ 
#>        Comparing: Mobile+ vs. Mobile- 
#> 
#>     Mobile+ Mobile-
#> UM+     136     107
#> UM-     297     165
#> 
#>                                        2.5%     97.5%
#> Observed Relative Risk: 0.7984287 0.6518303 0.9779975
#>    Observed Odds Ratio: 0.7061267 0.5143958 0.9693215
#> ---
#>                                                 
#> Selection Bias Corrected Relative Risk: 1.483780
#>    Selection Bias Corrected Odds Ratio: 1.634608

The 2X2 table is provided as a matrix and selection probabilities given with the argument bias_parms, a vector with the 4 probabilities (guided by the participation rates in cases and controls) in the following order: among cases exposed, among cases unexposed, among noncases exposed, and among noncases unexposed. The output shows the observed 2X2 table, the observed odds ratio (and relative risk) followed by the corrected ones.

Installation

You can get the latest release from CRAN:

install.packages('episensr')

Or install the development version from GitHub with devtools package:

#install.packages("remotes")
remotes::install_github('dhaine/episensr', ref = "develop")
Metadata

Version

1.3.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows