qplotBmd: Plotting benchmark doses using ggplot2

View source: R/qplotBmd.R

qplotBmdR Documentation

Plotting benchmark doses using ggplot2

Description

qplotBmd displays benchmark dose values with options to plot confidence intervals as well using ggplot2.

Usage

  qplotBmd(x, ..., interval = c("BMDL", "twosided", "none"), add = FALSE)

Arguments

x

an object of class 'bmd'.

...

arguments to be passed on to qplotDrc, if add = FALSE

interval

option to plot only the lower limit of the confidence interval for the benchmark dose ("BMDL", default), both limit of the confidence interval ("twosided"), or no confidence interval ("none").

add

logical. If TRUE then the functions returns a list of plot layers to be added to an already existing ggplot.

Details

This function is a simple function to plot benchmark dose values

Value

A ggplot object. If the option add is used, a list of ggplot layers is returned.

Author(s)

Jens Riis Baalkilde.

Examples


## Fitting model and calculating BMD. 
model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative")

# Plot
qplotBmd(bmd0, interval = "twosided", add = FALSE)

qplotDrc(model,type="confidence") +
  qplotBmd(bmd0, interval = "twosided", add = TRUE)

qplotBmd(bmd0, interval = "twosided", add = FALSE)



DoseResponse/bmd documentation built on March 29, 2025, 4:36 p.m.