Treatment rankings and rank probabilities
Produce posterior treatment rankings and rank probabilities from a fitted NMA model. When a meta-regression is fitted with effect modifier interactions with treatment, these will differ by study population.
posterior_ranks( x, newdata = NULL, study = NULL, lower_better = TRUE, probs = c(0.025, 0.25, 0.5, 0.75, 0.975), summary = TRUE ) posterior_rank_probs( x, newdata = NULL, study = NULL, lower_better = TRUE, cumulative = FALSE )
x |
A |
newdata |
Only used if a regression model is fitted. A data frame of
study details, one row per study, giving the covariate values at which to
produce relative effects. Column names must match variables in the
regression model. If |
study |
Column of |
lower_better |
Logical, are lower treatment effects better ( |
probs |
Numeric vector of quantiles of interest to present in computed
summary, default |
summary |
Logical, calculate posterior summaries? Default |
cumulative |
Logical, return cumulative rank probabilities? Default is
|
The function posterior_ranks()
produces posterior rankings, which
have a distribution (e.g. mean/median rank and 95% Credible Interval). The
function posterior_rank_probs()
produces rank probabilities, which give
the posterior probabilities of being ranked first, second, etc. out of all
treatments.
The argument lower_better
specifies whether lower treatment
effects or higher treatment effects are preferred. For example, with a
negative binary outcome lower (more negative) log odds ratios are
preferred, so lower_better = TRUE
. Conversely, for example, if treatments
aim to increase the rate of a positive outcome then lower_better = FALSE
.
A nma_summary object if summary = TRUE
, otherwise a list
containing a 3D MCMC array of samples and (for regression models) a data
frame of study information.
plot.nma_summary()
for plotting the ranks and rank probabilities.
## Smoking cessation # Run smoking RE NMA example if not already available if (!exists("smk_fit_RE")) example("example_smk_re", run.donttest = TRUE) # Produce posterior ranks smk_rank_RE <- posterior_ranks(smk_fit_RE, lower_better = FALSE) smk_rank_RE plot(smk_rank_RE) # Produce rank probabilities smk_rankprob_RE <- posterior_rank_probs(smk_fit_RE, lower_better = FALSE) smk_rankprob_RE plot(smk_rankprob_RE) # Produce cumulative rank probabilities smk_cumrankprob_RE <- posterior_rank_probs(smk_fit_RE, lower_better = FALSE, cumulative = TRUE) smk_cumrankprob_RE plot(smk_cumrankprob_RE) # Further customisation is possible with ggplot commands plot(smk_cumrankprob_RE) + ggplot2::facet_null() + ggplot2::aes(colour = Treatment) ## Plaque psoriasis ML-NMR # Run plaque psoriasis ML-NMR example if not already available if (!exists("pso_fit")) example("example_pso_mlnmr", run.donttest = TRUE) # Produce population-adjusted rankings for all study populations in # the network # Ranks pso_rank <- posterior_ranks(pso_fit) pso_rank plot(pso_rank) # Rank probabilities pso_rankprobs <- posterior_rank_probs(pso_fit) pso_rankprobs plot(pso_rankprobs) # Cumulative rank probabilities pso_cumrankprobs <- posterior_rank_probs(pso_fit, cumulative = TRUE) pso_cumrankprobs plot(pso_cumrankprobs) # Produce population-adjusted rankings for a different target # population new_agd_means <- data.frame( bsa = 0.6, prevsys = 0.1, psa = 0.2, weight = 10, durnpso = 3) # Ranks posterior_ranks(pso_fit, newdata = new_agd_means) # Rank probabilities posterior_rank_probs(pso_fit, newdata = new_agd_means) # Cumulative rank probabilities posterior_rank_probs(pso_fit, newdata = new_agd_means, cumulative = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.