plot.MBMA_stan: Plot a dose-response plot

Description Usage Arguments Value Author(s) Source See Also Examples

View source: R/plot.MBMA_stan.R

Description

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

Usage

1
2
## S3 method for class 'MBMA_stan'
plot(x = MBMA.stan, ...)

Arguments

x

A MBMA_stan object.

...

Further arguments passed to ggplot.

Value

The return value is invisible NULL.

Author(s)

Christian Roever and Burak Kuersad Guenhan

Source

This function uses ggplot function from ggplot2 R package.

See Also

ggplot2::ggplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## 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)

MetaStan documentation built on Jan. 22, 2022, 5:06 p.m.