View source: R/plot.MBMA_stan.R
plot.MBMA_stan | R Documentation |
Takes a MBMA_stan
object which is obtained by function MBMA_stan
and plot
a dose-response plot, showing observed event probabilities and the estimated dose-response
function with pointwise 95
## S3 method for class 'MBMA_stan' plot(x = MBMA.stan, ...)
x |
A |
... |
Further arguments passed to ggplot. |
The return value is invisible NULL
.
Christian Roever and Burak Kuersad Guenhan
This function uses ggplot
function from ggplot2
R package.
ggplot2::ggplot
## Not run: data('dat.Eletriptan', package = "MetaStan") datMBMA = create_MetaStan_dat(dat = dat.Eletriptan, armVars = c(dose = "d", responders = "r", sampleSize = "n"), nArmsVar = "nd") MBMA.Emax <- MBMA_stan(data = datMBMA, likelihood = "binomial", dose_response = "emax", Pred_doses = seq(0, 80, length.out = 11), mu_prior = c(0, 100), Emax_prior = c(0, 100), tau_prior_dist = "half-normal", tau_prior = 0.5) plot(MBMA.Emax) + ggplot2::xlab("Doses (mg)") + ggplot2::ylab("response probabilities") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.