plot.mbnma.predict {MBNMAdose} | R Documentation |
Plots predicted responses from a dose-response MBNMA model
Description
Plots predicted responses on the natural scale from a dose-response MBNMA model.
Usage
## S3 method for class 'mbnma.predict'
plot(
x,
disp.obs = FALSE,
overlay.split = FALSE,
method = "common",
agent.labs = NULL,
scales = "free_x",
...
)
Arguments
x |
An object of class |
disp.obs |
A boolean object to indicate whether to show the location of observed doses
in the data on the 95\% credible intervals of the predicted dose-response curves as shaded regions ( |
overlay.split |
A boolean object indicating whether to overlay a line
showing the split (treatment-level) NMA results on the plot ( |
method |
Indicates the type of split (treatment-level) NMA to perform when |
agent.labs |
A character vector of agent labels to display on plots. If
left as |
scales |
Should scales be fixed ( |
... |
Arguments for |
Details
For the S3 method plot()
, it is advisable to ensure predictions in
predict
are estimated using a sufficient number of doses to ensure a smooth
predicted dose-response curve. If disp.obs = TRUE
it is
advisable to ensure predictions in predict
are estimated using an even
sequence of time points to avoid misrepresentation of shaded densities.
Examples
# Using the triptans data
network <- mbnma.network(triptans)
# Run an Emax dose-response MBNMA and predict responses
emax <- mbnma.run(network, fun=demax(), method="random")
pred <- predict(emax, E0 = 0.5)
plot(pred)
# Display observed doses on the plot
plot(pred, disp.obs=TRUE)
# Display split NMA results on the plot
plot(pred, overlay.split=TRUE)
# Split NMA results estimated using random treatment effects model
plot(pred, overlay.split=TRUE, method="random")
# Add agent labels
plot(pred, agent.labs=c("Elet", "Suma", "Frov", "Almo", "Zolmi",
"Nara", "Riza"))
# These labels will throw an error because "Placebo" is included in agent.labs when
#it will not be plotted as a separate panel
#### ERROR ####
#plot(pred, agent.labs=c("Placebo", "Elet", "Suma", "Frov", "Almo", "Zolmi",
# "Nara", "Riza"))
# If insufficient predictions are made across dose-response function
# then the plotted responses are less smooth and can be misleading
pred <- predict(emax, E0 = 0.5, n.doses=3)
plot(pred)