# \donttest{
# Using the triptans data
network <- mbnma.network(triptans)
# Estimate rankings from an Emax dose-response MBNMA
emax <- mbnma.run(network, fun=demax(), method="random")
ranks <- rank(emax)
# Plot rankings for both dose-response parameters (in two separate plots)
plot(ranks)
# Plot rankings just for ED50
plot(ranks, params="ed50")
# Plot rankings from prediction
doses <- list("eletriptan"=c(0,1,2,3), "rizatriptan"=c(0.5,1,2))
pred <- predict(emax, E0 = "rbeta(n, shape1=1, shape2=5)",
exact.doses=doses)
rank <- rank(pred)
plot(rank)
# Trying to plot a parameter that has not been ranked will return an error
#### ERROR ####
# plot(ranks, params="not.a.parameter")
# }
Run the code above in your browser using DataLab