Learn R Programming

nlmixr2lib (version 0.3.0)

addResErr: Add residual error to a model

Description

Add residual error to a model

Usage

addResErr(ui, reserr, endpoint)

Value

The model with residual error modified

Arguments

ui

The model as a function

reserr

The type or types of residual error (currently "addSd", "propSd", and "lnormSd" are accepted)

endpoint

the endpoint to apply the error; will default to the first error in the model

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 Cc, the parameter name for propSd will become CcpropSd.

Examples

Run this code
library(rxode2)
readModelDb("PK_1cmt") |> addResErr("addSd")
readModelDb("PK_1cmt") |> addResErr("lnormSd")
readModelDb("PK_1cmt") |> addResErr(c("addSd", "propSd"))

Run the code above in your browser using DataLab