numeric. The number of simulated curves to be returned.
fct
list. Any built-in function in drc or a list with similar components.
mpar
numeric. The model parameters to be supplied to fct.
xerror
numeric or character. The distribution for the dose values.
xpar
numeric vector supplying the parameter values defining the distribution for the dose values.
If xerror is a distribution then remember that the number of dose values also is part of this argument
(the first argument).
yerror
numeric or character. The error distribution for the response values.
ypar
numeric vector supplying the parameter values defining the error distribution for the
response values.
onlyY
logical. If TRUE then only the response values are returned (useful in simulations).
Otherwise both dose values and response values (and for binomial data also the weights) are returned.
seedVal
numeric. The seed to be used.
Value
A list with up to 3 components (depending on the value of the onlyY argument).
Details
The distribution for the dose values can either be a fixed set of dose values (a numeric vector)
used repeatedly for creating all curves or be a distribution specified as a character string resulting in
varying dose values from curve to curve.
The error distribution for the response values can be any continuous distribution
like rnorm or rgamma. Alternatively it can be the binomial distribution.
## Model fitm1 <- drm(rootl~conc, data = ryegrass, fct = LL.4())
## 10 random dose-response curves based on the model fitsim10 <- rdrm(10, LL.4(), coef(m1), xerror = ryegrass$conc)
sim10