addResErr {nlmixr2lib} | R Documentation |
Add residual error to a model
Description
Add residual error to a model
Usage
addResErr(model, reserr)
Arguments
model |
The model as a function |
reserr |
The type or types of residual error (currently |
Details
For reserr
, the parameter will be named with the dependent
variable from the model as a prefix. For example, if the dependent
variable in the model is cp
, the parameter name for propSd
will become cppropSd
.
Value
The model with residual error modified
Examples
library(rxode2)
readModelDb("PK_1cmt") %>% addResErr("addSd")
readModelDb("PK_1cmt") %>% addResErr("lnormSd")
readModelDb("PK_1cmt") %>% addResErr(c("addSd", "propSd"))
[Package nlmixr2lib version 0.2.0 Index]