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"), col = FALSE, 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").

col

logical. If TRUE then multiple curves specified by "curveid" in the dose-response model are distinguised by colours rather than point shapes and line types

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

library(drc)
library(drcData)

## 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 July 4, 2025, 11:20 p.m.