Skip to contents

Measurement error of an output. With add and prop: sd = sqrt(add^2 + (prop * f)^2), where f is the model prediction (the combined2 form of nlmixr2); use add alone for additive error and prop alone for proportional error. With exp: exponential error, that is additive error of standard deviation exp on the log scale (data fitted as log(y)). Exponential error is not combined with the others.

Usage

residual_error(add = 0, prop = 0, exp = 0)

Arguments

add

Additive standard deviation (in the units of the output).

prop

Proportional standard deviation (for example 0.1 for 10%).

exp

Standard deviation on the log scale (exponential error).

Value

An object of class pkident_residual.

Details

Proportional and exponential errors differ in the Fisher information: with proportional error the variance depends on the parameters and carries information of its own; with exponential error it does not.

Examples

residual_error(prop = 0.1)
#> <pkident residual error> add = 0, prop = 0.1
residual_error(add = 0.05, prop = 0.1)
#> <pkident residual error> add = 0.05, prop = 0.1
residual_error(exp = 0.2)
#> <pkident residual error> exponential (additive on the log scale), sd = 0.2