qplotBmd | R Documentation |
qplotBmd
displays benchmark dose values with options to plot confidence intervals as well using ggplot2
.
qplotBmd(x, ..., interval = c("BMDL", "twosided", "none"), add = FALSE)
x |
an object of class 'bmd'. |
... |
arguments to be passed on to qplotDrc, if |
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. |
This function is a simple function to plot benchmark dose values
A ggplot
object. If the option add
is used, a list of ggplot
layers is returned.
Jens Riis Baalkilde.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.