get.indiv | R Documentation |
This function calculates individual probabilities for each death and provide posterior credible intervals for each estimates. The default set up is to calculate the 95
get.indiv( object, data = NULL, CI = 0.95, is.aggregate = FALSE, by = NULL, is.sample = FALSE, java_option = "-Xmx1g", ... )
object |
Fitted |
data |
data for the fitted |
CI |
Credible interval for posterior estimates. |
is.aggregate |
logical indicator for constructing aggregated distribution rather than individual distributions. |
by |
list of column names to group by. |
is.sample |
logical indicator for returning the posterior samples of individual probabilities instead of posterior summaries. |
java_option |
Option to initialize java JVM. Default to ā-Xmx1gā, which sets the maximum heap size to be 1GB. |
... |
Not used. |
mean |
individual mean COD distribution matrix. |
median |
individual median COD distribution matrix. |
lower |
individual lower bound for each COD probability. |
upper |
individual upper bound for each COD probability. |
Zehang Li, Tyler McCormick, Sam Clark
Maintainer: Zehang Li <lizehang@uw.edu>
Tyler H. McCormick, Zehang R. Li, Clara Calvert, Amelia C. Crampin, Kathleen Kahn and Samuel J. Clark Probabilistic cause-of-death assignment using verbal autopsies, Journal of the American Statistical Association (2016), 111(515):1036-1049.
insilico
, updateIndiv
, plot.insilico
## Not run: data(RandomVA1) fit1<- insilico(RandomVA1, subpop = NULL, Nsim = 1000, burnin = 500, thin = 10 , seed = 1, auto.length = FALSE) summary(fit1, id = "d199") # Calculate aggregated COD distributions agg.csmf <- get.indiv(data = RandomVA1, fit1, CI = 0.95, is.aggregate = TRUE, by = NULL) head(agg.csmf) agg.by.sex.age <- get.indiv(data = RandomVA1, fit1, CI = 0.95, is.aggregate = TRUE, by = list("sex", "age")) head(agg.by.sex.age$mean) # Obtain individual level P(Y|X) posterior draws (N by C by Nitr array) prob <- get.indiv(data = RandomVA1, fit1, is.sample = TRUE) dim(prob) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.