getCCC | R Documentation |
Denote the cause-specific accuracy for the j-th cause to be (# of deaths correctly assigned to cause j) / (# of death due to cause j). For causes 1, 2, ..., C, the cause-specific CCC is computed for the j-th cause is defined to be (j-th cause-specific accuracy - 1 / C) / (1 - 1 / C) and the overall CCC is the average of each cause-specific CCC.
getCCC(cod, truth, C = NULL)
cod |
a data frame of estimated cause of death. The first column is the ID and the second column is the estimated cause. |
truth |
a data frame of true causes of death. The first column is the ID and the second column is the estimated cause. |
C |
the number of possible causes to assign. If unspecified, the number of unique causes in cod and truth will be used. |
Other output extraction:
getCSMF_accuracy()
,
getCSMF()
,
getIndivProb()
,
getTopCOD()
est <- data.frame(ID = c(1, 2, 3), cod = c("C1", "C2", "C1"))
truth <- data.frame(ID = c(1, 2, 3), cod = c("C1", "C3", "C3"))
# If there are only three causes
getCCC(est, truth)
# If there are 20 causes that can be assigned
getCCC(est, truth, C = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.