plot.MBMA_stan: Plot a dose-response plot

View source: R/plot.MBMA_stan.R

plot.MBMA_stanR Documentation

Plot a dose-response plot

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

## 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

## 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)

gunhanb/metastan documentation built on March 18, 2023, 12:09 a.m.