Description Usage Arguments Value References Examples
View source: R/probsens.conf.R
Probabilistic sensitivity analysis to correct for unknown or unmeasured confounding and random error simultaneously.
1 2 3 4 5 6 7 8 9 10 11 12 13 14  probsens.conf(
case,
exposed,
reps = 1000,
prev.exp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
"logitlogistic", "logitnormal", "beta"), parms = NULL),
prev.nexp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
"logitlogistic", "logitnormal", "beta"), parms = NULL),
risk = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
"loglogistic", "lognormal"), parms = NULL),
corr.p = NULL,
discard = TRUE,
alpha = 0.05
)

case 
Outcome variable. If a variable, this variable is tabulated against. 
exposed 
Exposure variable. 
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, logitlogistic, logitnormal, or beta) and the second its parameters as a vector. Logitlogistic and logitnormal distributions can be shifted by providing lower and upper bounds. Avoid providing these values if a nonshifted distribution is desired.

prev.nexp 
List defining the prevalence of exposure among the unexposed. 
risk 
List defining the confounderdisease relative risk or the confounderexposure odds ratio. The first argument provides the probability distribution function (constant, uniform, triangular, trapezoidal, loglogistic, or lognormal) and the second its parameters as a vector:

corr.p 
Correlation between the exposurespecific confounder prevalences. 
discard 
A logical scalar. In case of negative adjusted count, should the draws be discarded? If set to FALSE, negative counts are set to zero. 
alpha 
Significance level. 
A list with elements:
obs.data 
The analyzed 2 x 2 table from the observed data. 
obs.measures 
A table of observed relative risk and odds ratio with confidence intervals. 
adj.measures 
A table of corrected relative risks and odds ratios. 
sim.df 
Data frame of random parameters and computed values. 
reps 
Number of replications. 
Lash, T.L., Fox, M.P, Fink, A.K., 2009 Applying Quantitative Bias Analysis to Epidemiologic Data, pp.117–150, Springer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  # The data for this example come from:
# Tyndall M.W., Ronald A.R., Agoki E., Malisa W., Bwayo J.J., NdinyaAchola J.O. et al.
# Increased risk of infection with human immunodeficiency virus type 1 among
# uncircumcised men presenting with genital ulcer disease in Kenya.
# Clin Infect Dis 1996;23:44953.
set.seed(123)
probsens.conf(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV"), c("Circ+", "Circ")), nrow = 2, byrow = TRUE),
reps = 20000,
prev.exp = list("triangular", c(.7, .9, .8)),
prev.nexp = list("trapezoidal", c(.03, .04, .05, .06)),
risk = list("triangular", c(.6, .7, .63)),
corr.p = .8)
set.seed(123)
probsens.conf(matrix(c(105, 85, 527, 93),
dimnames = list(c("HIV+", "HIV"), c("Circ+", "Circ")), nrow = 2, byrow = TRUE),
reps = 20000,
prev.exp = list("beta", c(200, 56)),
prev.nexp = list("beta", c(10, 16)),
risk = list("triangular", c(.6, .7, .63)),
corr.p = .8)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.