Learn R Programming

openVA (version 1.0.9)

getCSMF: Obtain CSMF from fitted model

Description

Obtain CSMF from fitted model

Usage

getCSMF(x, CI = 0.95, interVA.rule = TRUE)

Arguments

x

a fitted object from codeVA.

CI

For insilico object only, specifying the credible interval to return. Default value to be 0.95.

interVA.rule

Logical indicator for interVA object only. If TRUE, it means only up to top 3 causes for each death are used to calculate CSMF and the rest are categorized as "undetermined"

Value

a vector or matrix of CSMF for all causes.

Examples

Run this code
# NOT RUN {
library(InSilicoVA)
data(RandomVA1)
# for illustration, only use interVA on 100 deaths
fit <- codeVA(RandomVA1[1:100, ], data.type = "WHO2012", model = "InterVA", 
                  version = "4.03", HIV = "h", Malaria = "l", write=FALSE)
getCSMF(fit)
library(InterVA5)
data(RandomVA5)
fit <- codeVA(RandomVA5[1:100, ], data.type = "WHO2016", model = "InterVA", 
                  version = "5.0", HIV = "h", Malaria = "l", write=FALSE)
getCSMF(fit)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab