Description Usage Arguments Value References Examples

View source: R/probsens.irr.conf.R

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
probsens.irr.conf(
counts,
pt = NULL,
reps = 1000,
prev.exp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
"logit-logistic", "logit-normal", "beta"), parms = NULL),
prev.nexp = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
"logit-logistic", "logit-normal", "beta"), parms = NULL),
risk = list(dist = c("constant", "uniform", "triangular", "trapezoidal",
"log-logistic", "log-normal"), parms = NULL),
corr.p = NULL,
discard = TRUE,
alpha = 0.05
)
``` |

`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:
| |||||||||

`pt` |
A numeric vector of person-time at risk. If provided, | |||||||||

`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, logit-normal, or beta) and the second its parameters as a vector. Logit-logistic and logit-normal distributions can be shifted by providing lower and upper bounds. Avoid providing these values if a non-shifted distribution is desired. constant; value, uniform: min, max, triangular: lower limit, upper limit, mode, trapezoidal: min, lower mode, upper mode, max. logit-logistic: location, scale, lower bound shift, upper bound shift, logit-normal: location, scale, lower bound shift, upper bound shift, beta: alpha, beta.
| |||||||||

`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 parameters as a vector: constant: value, uniform: min, max, triangular: lower limit, upper limit, mode, trapezoidal: min, lower mode, upper mode, max. log-logistic: shape, rate. Must be strictly positive, log-normal: meanlog, sdlog. This is the mean and standard deviation on the log scale.
| |||||||||

`corr.p` |
Correlation between the exposure-specific 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 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. |

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 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.