Learn R Programming

episensr (version 0.7.1)

probsens.irr.conf: Probabilistic sensitivity analysis for unmeasured confounding of person-time data and random error.

Description

Probabilistic sensitivity analysis to correct for unmeasured confounding when person-time data has been collected.

Usage

probsens.irr.conf(counts, pt = NULL, reps = 1000, prev.exp = list(dist =
  c("constant", "uniform", "triangular", "trapezoidal", "logit-logistic",
  "logit-normal"), parms = NULL), prev.nexp = list(dist = c("constant",
  "uniform", "triangular", "trapezoidal", "logit-logistic", "logit-normal"),
  parms = NULL), risk = list(dist = c("constant", "uniform", "triangular",
  "trapezoidal", "log-logistic", "log-normal"), parms = NULL), corr.p = NULL,
  alpha = 0.05, dec = 4, print = TRUE)

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: lll{ Exposed Unexposed Cases a b Person-time N1 N0 }
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.
prev.exp
List defining the prevalence of exposure among the exposed. The first argument provides the probability distribution function (constant,uniform, triangular, trapezoidal, logit-logistic, or logit-normal) and the second its parameters as a vector:
  1. C
prev.nexp
List defining the prevalence of exposure among the unexposed.
risk
List defining the confounder-disease relative risk or the confounder-exposure odds ratio. The first argument provides the probability distribution function (constant,uniform, triangular, trapezoidal, log-logistic, or log-normal) and the second its paramet
corr.p
Correlation between the exposure-specific confounder prevalences.
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 incidence rate ratio with exact confidence interval.
  • adj.measuresA table of corrected incidence rate 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
set.seed(123)
# Unmeasured confounding
probsens.irr.conf(matrix(c(77, 10000, 87, 10000),
dimnames = list(c("D+", "Person-time"), c("E+", "E-")), ncol = 2),
reps = 20000,
prev.exp = list("trapezoidal", c(.01, .2, .3, .51)),
prev.nexp = list("trapezoidal", c(.09, .27, .35, .59)),
risk = list("trapezoidal", c(2, 2.5, 3.5, 4.5)),
corr.p = .8)

Run the code above in your browser using DataLab