tariff {Tariff} | R Documentation |
Replicate Tariff methods
Description
This function implements Tariff method.
Usage
tariff(causes.train, symps.train, symps.test, causes.table = NULL,
use.rank = TRUE, nboot.rank = 1, use.sig = TRUE, nboot.sig = 500,
use.top = FALSE, ntop = 40, ...)
Arguments
causes.train |
character vector of causes, or the column name of cause in the training data |
symps.train |
N.train by S matrix |
symps.test |
N.test by S matrix |
causes.table |
list of causes in the data |
use.rank |
logical indicator for whether using ranks instead of scores |
nboot.rank |
number of re-sampling for baseline rank comparison. Default to 1, which resamples training data to have a uniform cause distribution of the same size. Set this to 0 removes bootstrapping the training dataset. |
use.sig |
logical indicator for whether using significant Tariff only |
nboot.sig |
number of re-sampling for testing significance. |
use.top |
logical indicator for whether the tariff matrix should be cleaned to have only top symptoms |
ntop |
number of top tariff kept for each cause |
... |
not used |
Value
score |
matrix of score for each cause within each death |
causes.train |
vector of most likely causes in training data |
causes.test |
vector of most likely causes in testing data |
csmf |
vector of CSMF |
causes.table |
cause list used for output, i.e., list of existing causes in the training data |
use.rank |
logical indicator for whether using ranks instead of scores |
Author(s)
Zehang Li, Tyler McCormick, Sam Clark
Maintainer: Zehang Li <lizehang@uw.edu>
References
James, S. L., Flaxman, A. D., Murray, C. J., & Population Health Metrics Research Consortium. (2011). Performance of the Tariff Method: validation of a simple additive algorithm for analysis of verbal autopsies. Population Health Metrics, 9(1), 1-16.
Serina, P., Riley, I., Stewart, A., James, S. L., Flaxman, A. D., Lozano, R., ... & Ahuja, R. (2015). Improving performance of the Tariff Method for assigning causes of death to verbal autopsies. BMC medicine, 13(1), 1.
Tyler H. McCormick, Zehang R. Li, Clara Calvert, Amelia C. Crampin, Kathleen Kahn and Samuel J. Clark(2016) Probabilistic cause-of-death assignment using verbal autopsies, http://arxiv.org/abs/1411.3042 To appear, Journal of the American Statistical Association
Examples
data("RandomVA3")
test <- RandomVA3[1:200, ]
train <- RandomVA3[201:400, ]
allcauses <- unique(train$cause)
fit <- tariff(causes.train = "cause", symps.train = train,
symps.test = test, causes.table = allcauses)
correct <- which(fit$causes.test[,2] == test$cause)
accuracy <- length(correct) / dim(test)[1]