diagstats: Calculate statistical measures of test performance for...

View source: R/diagstats.R

diagstatsR Documentation

Calculate statistical measures of test performance for objects of class diagmeta

Description

The user can provide cutoffs, sensitivities, and / or specificities to calculate the respective quantities (with confidence intervals). Furthermore, positive predictive values (PPV), negative predictive values (NPV), and probabilities of disease (PD) are calculated if the prevalence is provided.

Usage

diagstats(x, cutoff = x$optcut, sens, spec, prevalence, level = 0.95)

Arguments

x

An object of class diagmeta.

cutoff

A numeric or vector with cutoff value(s).

sens

A numeric or vector with sensitivity value(s).

spec

A numeric or vector with specificity value(s).

prevalence

A numeric or vector with the prevalence(s).

level

The level used to calculate confidence intervals.

Value

A data frame of class "diagstats" with the following variables:

cutoff

Cutoffs provided in argument cutoff and / or model-based cutoff values for given sensitivities / specificities.

Sens

Sensitivities provided in argument sens and / or model-based estimates of the sensitivity for given cutoffs / specificities.

lower.Sens, upper.Sens

Lower and upper confidence limits of the sensitivities.

Spec

Specificities provided in argument spec and / or model-based estimates of the specificity for given cutoffs / sensitivities.

lower.Spec, upper.Spec

Lower and upper confidence limits of the specificities.

prevalence

As defined above.

PPV

Positive predictive value (based on the prevalence).

lower.PPV, upper.PPV

Lower and upper confidence limits of positive predictive values.

NPV

Negative predictive value (based on the prevalence)

lower.NPV, upper.NPV

Lower and upper confidence limits of negative predictive values.

PD

Probability of disease if the given cutoff value was observed as the measurement for an individual.

lower.PD, upper.PD

Lower and upper confidence limits of probabilities of disease.

dens.nondiseased

Value of the model-based density function at the cutoff(s) for non-diseased individuals.

dens.diseased

Value of the model-based density function at the cutoff(s) for diseased individuals.

Author(s)

Gerta Rücker gerta.ruecker@uniklinik-freiburg.de, Srinath Kolampally kolampal@imbi.uni-freiburg.de, Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

See Also

diagmeta print.diagstats

Examples

# FENO dataset
#
data(Schneider2017)

diag1 <- diagmeta(tpos, fpos, tneg, fneg, cutpoint,
                  studlab = paste(author, year, group),
                  data = Schneider2017, 
                  log.cutoff = TRUE)

# Results at the optimal cutoff
#
diagstats(diag1)

# Results for cutoffs 25 and 50 (and a prevalence of 10%)
#
diagstats(diag1, c(25, 50), prevalence = 0.10)

# Results for sensitivity and specificity of 0.95
#
diagstats(diag1, sens = 0.95, spec = 0.95)


guido-s/diagmeta documentation built on Oct. 1, 2024, 6:29 p.m.