cohortODX {baclava} | R Documentation |
Cohort-specific Overdiagnosis
Description
Estimates the overall and screening specific overdiagnosis probability for the cohort of the original analysis.
Usage
cohortODX(
object,
data.clinical,
data.assess,
other.cause.rates = NULL,
plot = TRUE
)
Arguments
object |
A 'baclava' object. The value object returned by fit_baclava(). |
data.clinical |
A data.frame object. The clinical data. The data must be structured as
If the sensitivity parameter (beta) is arm-specific, an additional
column |
data.assess |
A data.frame object. Disease status assessments recorded during healthy or preclinical compartment, e.g., screenings for disease. The data must be structured as
If the sensitivity parameter (beta) is screen-specific, an additional
column |
other.cause.rates |
A data.frame object. Age specific incidence rates that do not include the disease of interest. Must contain columns "Rate" and "Age". |
plot |
A logical object. If TRUE, generates a boxplot of the overdiagnosis probability for each individual as a function of the screen at which disease was detected. Includes only the consecutive screens for which more than 1% of the screen detected cases were detected. |
Value
A list object.
-
all
An n x S matrix containing the estimated overdiagnosis probability for each individual (n) and each posterior parameter set (S). -
mean.individual
A vector containing the mean across S of the estimated overdiagnosis for each individual, i.e.,rowMeans(all)
. -
mean.overall
A numeric, the mean overdiagnosis probability across all posterior parameter sets and screen-detected cases, i.e.,mean(all)
. -
summary.by.screen
A matrix containing the summary statistics ofmean.individual
for the individuals detected positive at each screen, i.e.,summary(mean.individual[diagnosis_screen_id == i])
.
Examples
data(screen_data)
theta_0 <- list("rate_H" = 7e-4, "shape_H" = 2.0,
"rate_P" = 0.5 , "shape_P" = 1.0,
"beta" = 0.9, psi = 0.4)
prior <- list("rate_H" = 0.01, "shape_H" = 1,
"rate_P" = 0.01, "shape_P" = 1,
"a_psi" = 1/2 , "b_psi" = 1/2,
"a_beta" = 38.5, "b_beta" = 5.8)
# This is for illustration only -- the number of Gibbs samples should be
# significantly larger and the epsilon values should be tuned.
example <- fit_baclava(data.assess = data.screen,
data.clinical = data.clinical,
t0 = 30.0,
theta_0 = theta_0,
prior = prior,
save.latent = TRUE)
# if rates are not available, an all cause dataset is provided in the package
# NOTE: these predictions will be over-estimated
data(all_cause_rates)
all_cause_rates <- all_cause_rates[, c("Age", "both")]
colnames(all_cause_rates) <- c("Age", "Rate")
cohort_odx <- cohortODX(object = example,
data.clinical = data.clinical,
data.assess = data.screen,
other.cause.rates = all_cause_rates,
plot = FALSE)