## Smoking cessation
# \donttest{
# Run smoking RE NMA example if not already available
if (!exists("smk_fit_RE")) example("example_smk_re", run.donttest = TRUE)
# }
# \donttest{
# 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
# \donttest{
# Run plaque psoriasis ML-NMR example if not already available
if (!exists("pso_fit")) example("example_pso_mlnmr", run.donttest = TRUE)
# }
# \donttest{
# 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)
# }
Run the code above in your browser using DataLab