analyticScreening: Analytic screening measures of predictive accuracy

View source: R/analyticScreening.R

analyticScreeningR Documentation

Analytic screening measures of predictive accuracy

Description

Analytic calculation of screening sensitivity, specificity, positive and negative predictive value, concordance and relative utility, under a multivariate liability threshold model.

Usage

analyticScreening(VL, VX, VLX = NULL, thresh = NULL, prev, nsample = NULL)

Arguments

VL

Variance-covariance matrix of liability. Must have 1 on diagonal.

VX

Variance-covariance matrix of predictors.

VLX

Cross-covariance matrix between liabilities and predictors. Entry on row i, column j, is covariance between liability i and predictor j. Diagonal entries are the liability variances explained for each trait.

thresh

Vector of risk thresholds for predicting an event. If NULL, which is the default, concordance is the only measure that can be calculated.

prev

Vector of prevalences, ie population risks, for each trait.

nsample

Number of random samples drawn when estimating concordance. If NULL, which is the default, concordance is not calculated.

Details

Screening measures consider the prediction of at least one outcome to occur, without regard to whether the correct outcomes are predicted. For example, screening sensitivity is the probability that, for an individual in which at least one outcome did occur, the predicted risk exceeds the threshold for at least one outcome (but not necessary the ones that did occur). Screening specificity is the probability that, for an individual in which no outcomes did occur, the predicted risk is lower than the threshold for all outcomes.

Screening concordance is the probability that given one individual in which at least one outcome did occur, and another in which no outcomes did occur, the maximum predicted risk over all outcomes is higher in the former individual. It is calculated by randomly simulating nsample such pairs of individuals from the specified model.

Value

A list with the following components

sens Sensitivity

spec Specificity

PPV Positive predictive value

NPV Negative predictive value

C Concordance

RU Relative utility

Examples

# results will vary due to random sampling in computing multivariate integrals
attach(PRSdata)
analyticScreening(VL,VX,VX,thresh=prevalence,prev=prevalence,nsample=1e5)

# $sens
# [1] 0.9591925

# $spec
# [1] 0.06055228

# $PPV
# [1] 0.1604819

# $NPV
# [1] 0.8879618

# $C
# [1] 0.59799

# $RU
# [1] -0.04479532


DudbridgeLab/multipred documentation built on Sept. 30, 2022, 2:24 a.m.