getCSMF_accuracy: Calculate CSMF accuracy

View source: R/CSMF.r

getCSMF_accuracyR Documentation

Calculate CSMF accuracy

Description

Calculate CSMF accuracy

Usage

getCSMF_accuracy(csmf, truth, undet = NULL)

Arguments

csmf

a CSMF vector from getCSMF or a InSilicoVA fitted object.

truth

a CSMF vector of the true CSMF.

undet

name of the category denoting undetermined causes. Default to be NULL. If undetermined cause is present, it will be removed and the rest of the CSMF will be re-normalized to sum to 1.

Value

a number (or vector if input is InSilicoVA fitted object) of CSMF accuracy as 1 - sum(abs(CSMF - CSMF_true)) / (2 * (1 - min(CSMF_true))).

See Also

Other output extraction: getCCC(), getCSMF(), getIndivProb(), getTopCOD()

Examples

csmf1 <- c(0.2, 0.3, 0.5)
csmf0 <- c(0.3, 0.3, 0.4)
names(csmf0) <- names(csmf1) <- c("c1", "c2", "c3")
getCSMF_accuracy(csmf1, csmf0)
getCSMF_accuracy(csmf1, rev(csmf0))




openVA documentation built on May 29, 2024, 6:04 a.m.