This function creates a posterior clustering matrix for the interventions in the form of a ggplot.

clusterplot_ranks(data = NULL, mcmc = NULL, names = NULL, label_ranks = NULL)

Arguments

data

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

MCMC draws from the RaCE NMA model, in the form of the model output of the mcmc_RCMVN function.

names

A vector of intervention names (optional)

label_ranks

A vector containing rank levels for which posterior rank probabilities should be displayed within the clustering matrix. Only non-zero probabilities are displayed. Defaults to NULL, indicating no probabilities are displayed as text.

Value

A ggplot of a posterior clustering matrix for the interventions.

Examples

data("wang_posterior")
mcmc <- mcmc_raceNMA(posterior=wang_posterior,iter=2000)
#> [1] "Estimating chain 1 of 2."
#> [1] "Estimating chain 2 of 2."
clusterplot_ranks(mcmc=mcmc,names=paste0("Treatment ",1:10),label_ranks=1:3)