R/calculate_SUCRA_MNBT.R
calculate_SUCRA_MNBT.RdThis function creates a results table of SUCRA and Median Number of Better Treatments (MNBT) based on MCMC draws from a standard NMA model or a fitted RaCE-NMA model.
calculate_SUCRA_MNBT(data = NULL, mcmc = NULL, level = 0.5, names = NULL)A NxJ matrix of data, where N is the number of observations and J the number of treatments. This feature is designed to display results from a standard NMA study.
MCMC draws from the RaCE NMA model, in the form of the model output of the mcmc_raceNMA function.
The level level for the interval estimate of MNBT. Defaults to 0.50.
A vector of intervention names (optional)
A table containing SUCRA and MNBT values for each treatment, ordered by descending SUCRA values.
mcmc <- mcmc_raceNMA(mu_hat=c(0,0,1,1), s=c(.1,.1,.1,.1), seed=1)
#> Estimating chain 1 of 2.
#> Estimating chain 2 of 2.
calculate_SUCRA_MNBT(mcmc=mcmc)
#> Treatment SUCRA MNBT (50% CI)
#> 1 2 0.9863500 0 (0, 0)
#> 2 1 0.9862333 0 (0, 0)
#> 3 4 0.3199833 2 (2, 2)
#> 4 3 0.3192667 2 (2, 2)