powered by
Calculate CSMF accuracy
getCSMF_accuracy(csmf, truth, undet = NULL)
a CSMF vector from getCSMF or a InSilicoVA fitted object.
getCSMF
a CSMF vector of the true CSMF.
name of the category denoting undetermined causes. Default to be NULL.
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))).
# NOT RUN { csmf1 <- c(0.2, 0.3, 0.5) csmf0 <- c(0.3, 0.3, 0.4) acc <- getCSMF_accuracy(csmf1, csmf0) # }
Run the code above in your browser using DataLab