Skip to contents

Probabilistic sensitivity analysis to correct for selection bias.

Usage

probsens.sel(
  case,
  exposed,
  reps = 1000,
  or.parms = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
    "log-logistic", "log-normal"), parms = NULL),
  case.exp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
    "logit-logistic", "logit-normal", "beta"), parms = NULL),
  case.nexp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
    "logit-logistic", "logit-normal", "beta"), parms = NULL),
  ncase.exp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
    "logit-logistic", "logit-normal", "beta"), parms = NULL),
  ncase.nexp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
    "logit-logistic", "logit-normal", "beta"), parms = NULL),
  alpha = 0.05
)

Arguments

case

Outcome variable. If a variable, this variable is tabulated against.

exposed

Exposure 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, trapezoidal, log-logistic or log-normal) and the second its parameters as a vector:

  1. constant: constant value,

  2. uniform: min, max,

  3. triangular: lower limit, upper limit, mode,

  4. trapezoidal: min, lower mode, upper mode, max.

  5. log-logistic: shape, rate. Must be strictly positive,

  6. log-normal: meanlog, sdlog. This is the mean and standard deviation on the log scale.

case.exp

If or.parms not provided, defines the selection probability among case exposed. The first argument provides the probability distribution function and the second its parameters as a vector:

  1. constant: constant value,

  2. uniform: min, max,

  3. triangular: lower limit, upper limit, mode,

  4. trapezoidal: min, lower mode, upper mode, max.

  5. logit-logistic: location, scale, lower bound shift, upper bound shift,

  6. logit-normal: location, scale, lower bound shift, upper bound shift,

  7. beta: alpha, beta.

case.nexp

Same among cases non-exposed.

ncase.exp

Same among non-cases exposed.

ncase.nexp

Same among non-cases non-exposed.

alpha

Significance level.

Value

A list with elements:

obs.data

The analyzed 2 x 2 table from the observed data.

obs.measures

A table of observed odds ratio with confidence intervals.

adj.measures

A table of corrected odds ratios.

sim.df

Data frame of random parameters and computed values.

reps

Number of replications.

References

Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.117--150, Springer.

Examples

# 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)))
#> --Observed data-- 
#>          Outcome: Melanoma+ 
#>        Comparing: Mobile+ vs. Mobile- 
#> 
#>           Mobile+ Mobile-
#> Melanoma+     136     107
#> Melanoma-     297     165
#> 
#>                                     2.5%     97.5%
#> Observed Odds Ratio: 0.7061267 0.5143958 0.9693215
#> ---
#>                                               Median 2.5th percentile
#>            Odds Ratio -- systematic error: 1.1858399        0.7167006
#> Odds Ratio -- systematic and random error: 1.1805330        0.6466106
#>                                            97.5th percentile
#>            Odds Ratio -- systematic error:         1.8171632
#> Odds Ratio -- systematic and random error:         2.0544802