setErrorModel
[Monolix] Set error model
Set the error model type to be used for the observation model(s).
Call getObservationInformation to get a list of
the available observation names within the current project.
Usage
setErrorModel(...)
Arguments
- ...
A list of comma-separated pairs {observationModel = (character)errorModelType}.
Details
Available error model types are :
"constant" | obs = pred + a*err |
"proportional" | obs = pred + (b*pred)*err |
"combined1" | obs = pred + (b*pred^c + a)*err |
"combined2" | obs = pred + sqrt(a^2 + (b^2)*pred^(2c))*err |
where a, b, and c are parameters, obs is the observed data, pred is the prediction from the structural model,
and err is normally distributed with mean 0 and variance 1.
Error model parameters will be initialized to 1 by default.
Call setPopulationParameterInformation to modify their initial value.
The value of the exponent parameter c is fixed by default when using the "combined1" and "combined2" models.
Use setPopulationParameterInformation to enable its estimation.
See also
getContinuousObservationModel get the current observation model for the current project getObservationInformation to get the continuous observations present in the current project setPopulationParameterInformation to update error model parameters to be estimated
Set components of the continuous observation model(s): setObservationDistribution setObservationLimits
Examples
initializeLixoftConnectors("monolix")
project <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPKPD_project.mlxtran")
loadProject(project)
# get observation model names available in the current project, how they are mapped to the data,
# and how they are mapped to the predictions
getObservationInformation()$name
#> [1] "y1" "y2"
getObservationInformation()$mapping
#> y1 y2
#> "1" "2"
getContinuousObservationModel()$prediction
#> y1 y2
#> "Cc" "R"
# update the error model
setErrorModel(y1 = "proportional", y2 = "combined1")
getContinuousObservationModel()$errorModel
#> y1 y2
#> "proportional" "combined1"
getContinuousObservationModel()$formula
#> y1 y2
#> "y1 = Cc + b1*Cc * e\n" "y2 = R + (a2 + b2*R) * e\n"