Skip to contents

Probabilistic sensitivity analysis to correct for exposure misclassification when person-time data has been collected. Non-differential misclassification is assumed when only the two bias parameters seca and spca are provided. Adding the 2 parameters seexp and spexp (i.e. providing the 4 bias parameters) evaluates a differential misclassification.

Usage

probsens.irr(
  counts,
  pt = NULL,
  reps = 1000,
  seca = list(dist = c("constant", "uniform", "triangular", "trapezoidal", "normal",
    "beta"), parms = NULL),
  seexp = NULL,
  spca = list(dist = c("constant", "uniform", "triangular", "trapezoidal", "normal",
    "beta"), parms = NULL),
  spexp = NULL,
  corr_se = NULL,
  corr_sp = NULL,
  alpha = 0.05
)

Arguments

counts

A table or matrix where first row contains disease counts and second row contains person-time at risk, and first and second columns are exposed and unexposed observations, as:

ExposedUnexposed
Casesab
Person-timeN1N0
pt

A numeric vector of person-time at risk. If provided, counts must be a numeric vector of disease counts.

reps

Number of replications to run.

seca

List defining the sensitivity of exposure classification among those with the outcome. The first argument provides the probability distribution function (uniform, triangular, trapezoidal, truncated normal, or beta) and the second its parameters as a vector. Lower and upper bounds of the truncated normal have to be between 0 and 1.

  1. constant: constant value,

  2. uniform: min, max,

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

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

  5. normal: lower bound, upper bound, mean, sd,

  6. beta: alpha, beta.

seexp

List defining the sensitivity of exposure classification among those without the outcome.

spca

List defining the specificity of exposure classification among those with the outcome.

spexp

List defining the specificity 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.

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 incidence rate ratio with exact confidence interval.

adj_measures

A table of corrected incidence rate ratios.

sim_df

Data frame of random parameters and computed values.

Details

Correlations between sensitivity (or specificity) of exposure classification among cases and controls can be specified and use the NORmal To Anything (NORTA) transformation (Li & Hammond, 1975).

Updated calculations

episensr 2.0.0 introduced updated calculations of probabilistic bias analyses by (1) using the NORTA transformation to define a correlation between distributions, and (2) sampling true prevalences and then sampling the adjusted cell counts rather than just using the expected cell counts from a simple quantitative bias analysis. This updated version should be preferred but if you need to run an old analysis, you can easily revert to the computation using probsens.irr_legacy() as follows:

library(episensr)
probsens.irr <- probsens.irr_legacy

References

Li, S.T., Hammond, J.L., 1975. Generation of Pseudorandom Numbers with Specified Univariate Distributions and Correlation Coefficients. IEEE Trans Syst Man Cybern 5:557-561.

See also

Other misclassification: misclass(), misclass_cov()

Examples

set.seed(123)
# Exposure misclassification, non-differential
probsens.irr(matrix(c(2, 67232, 58, 10539000),
dimnames = list(c("GBS+", "Person-time"), c("HPV+", "HPV-")), ncol = 2),
reps = 20000,
seca = list("trapezoidal", c(.4, .45, .55, .6)),
spca = list("constant", 1))
#>  Calculating observed measures
#> ⠙ Assign probability distributions
#>  Assign probability distributions [12ms]
#> 
#> ⠙ Bias analysis
#>  Bias analysis [126ms]
#> 
#> 
#> ── Observed data ───────────────────────────────────────────────────────────────
#> • Outcome: GBS+
#> • Comparing: HPV+ vs. HPV-
#> 
#>                 HPV+     HPV-
#> GBS+               2       58
#> Person-time    67232 10539000
#>                                                  2.5%      97.5%
#>  Observed Incidence Rate Ratio:  5.4053694  0.6394374 20.4256527
#> ── Bias-adjusted measures ──
#> 
#>                                                          Median
#>            Incidence Rate Ratio -- systematic error:  5.5632127
#> Incidence Rate Ratio -- systematic and random error:  5.6517056
#>                                                      2.5th percentile
#>            Incidence Rate Ratio -- systematic error:        5.5179730
#> Incidence Rate Ratio -- systematic and random error:        0.9864857
#>                                                      97.5th percentile
#>            Incidence Rate Ratio -- systematic error:         5.6261720
#> Incidence Rate Ratio -- systematic and random error:        31.5871751