Description Usage Arguments Methods Examples
Plot dose-response curves from objects of class "drm"
and "bdrm"
.
1 2 3 4 5 6 7 8 9 10 | ## S4 method for signature 'drm,ANY'
plot(x, y, se = TRUE, add = FALSE, n = NULL, min_log10dose = 0,
xlab = "log10(dose)", ylab = "P(infection)",
type = "l", lwd = 2, col = "red",
se_pars = list(type = "l", lty = 2, lwd = 2, col = "blue"),
sim_pars = list(type = "l", lty = 1, col = rgb(0, 0, 0, 0.1)),
...)
## S4 method for signature 'bdrm,ANY'
plot(x, y, n = 100, add = FALSE, ...)
|
x |
Object of class |
y |
Ignored. |
se |
Logical. Should a 95% confidence interval be plotted? Defaults to |
add |
Logical. If |
n |
Number of simulated dose-response curves to be plotted (generated using |
min_log10dose |
Lower bound of x axis; defaults to 0. |
xlab,ylab |
Titles for x and y axes. |
type,lwd,col |
Type, line width and color of dose-response curve. |
se_pars |
List of graphical parameters for the 95% confidence interval curves; see |
sim_pars |
List of graphical parameters for the simulated dose-response curves; see |
... |
Other arguments to be passed to |
signature(x = "ANY", y = "ANY")
signature(x = "bdrm", y = "ANY")
signature(x = "drm", y = "ANY")
1 2 3 4 5 6 7 8 9 10 11 12 | ## Fit Beta-Poisson model to Campylobacter dataset
drm_fit <- drm(x = infected, n = total, dose = dose,
data = campy, model = "bp")
## Plot fitted dose-response curve and 100 simulated curves
plot(drm_fit, se = TRUE, sim = 100)
## Fit Bayesian Beta-Poisson model to Campylobacter dataset
bdrm_fit <- bdrm(x = infected, n = total, dose = dose,
data = campy, model = "bp",
inits = list(alpha = 1, beta = 1))
## Plot 100 simulated dose-response curves
plot(bdrm_fit, sim = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.