tune_calibratedva | R Documentation |
Uses a grid search to choose the shrinkage parameter for calibration which gives the lowest WAIC values.
tune_calibratedva( va_unlabeled, va_labeled = NULL, gold_standard = NULL, causes, method = c("mshrink", "pshrink"), alpha_vec = NULL, lambda_vec = NULL, samples_list = NULL, which.multimodal = "all", which.rhat = "all", ... )
va_unlabeled |
A matrix or list of causes for individuals without labeled
causes of death. See |
va_labeled |
A matrix or list of causes for individuals with labeled
causes of death. See |
gold_standard |
A matrix where each row represents either the true cause for an individual
with a labeled cause of death. See |
causes |
A character vector with the names of the causes. These should correspond to
the columns of |
method |
One of either "mshrink" (default) for M-shrinkage or "pshrink" for p-shrinkage |
alpha_vec |
If using M-shrinkage vector of values for alpha for which the function will evaluate the WAIC. If not provided, the function will auto-generate a vector. |
lambda_vec |
If using p-shrinkage vector of values for lambda for which the function will evaluate the WAIC. If not provided, the function will auto-generate a vector. |
which.multimodal |
A character specifying whether both p and M (which.multimodal = "all") should be evaluated for multimodality, or just p (which.multimodal = "p") |
which.rhat |
A character specifying whether both p and M (which.rhat = "all") should be evaluated for convergence, or just p (which.rhat = "p") |
... |
Additional arguments passed into |
A list with the following components.
A list with output specified in
calibratedva
object containing the posterior samples
for the best value of the parameter (either alpha or lambda)
The chosen value of alpha for the posterior samples. Null if using p-shrinkage.
The chosen value of lambda for the posterior samples. Null if using M-shrinkage.
A data frame containing a row for each parameter evaluated, which gives the WAIC, whether or not the posteriors were multimodal, and the Rhat of the posterior samples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.