Continuous observation model
Syntax compatible with Monolix
The DEFINITION: block in the [LONGITUDINAL] section is used to define the observational model:
DEFINITION:
observationName = {distribution = distributionType, prediction = predictionName, errorModel = errorModel(param)}
with:
observationName: to be replaced by the name of the observation, e.g
y1
distributionType: to be replaced by
logNormal
,normal
orlogitNormal
predictionName: to be replaced by a variable defined in the structural model, e.g
Cc
errorModel(param): to be replaced by
combined1(a, b)
,combined2(a, b)
,proportional(b)
orconstant(a)
. The error model parametersa
andb
must also be listed as input of the [LONGITUDINAL] section.a
andb
are commonly used as variable names, but any variable name is accepted (e.ga1
,aEffect
, etc)
For example, if the observation is a concentration with a combined error model (DV = Cc + (a+b*Cc)*e), the observational error model is written as
DEFINITION:
DV = {distribution = normal, prediction = Cc, errorModel=combined1(a, b)}
When the observational error is defined in the Mlxtran model file, the user must declare the observational model parameters (a and b in the presented example) as inputs of the [LONGITUDINAL] section.
[LONGITUDINAL]
input = {ka, V, Cl, a, b}
When a logitNormal distribution is selected, the boundaries (min and max) must also be defined:
DEFINITION:
yE = {distribution = logitNormal, min=0, max=100, prediction = E, errorModel=constant(a)}
Syntax specific to Simulx (incuding time-varying error models)
The following is accepted in Simulx. However Simulx projects using this syntax cannot be exported to Monolix.
The DEFINITION: block in the [LONGITUDINAL] section is used to define the observational model:
DEFINITION:
observationName = {distribution = distributionType, prediction = predictionName, sd = sdErr}
with:
observationName: to be replaced by the name of the observation, e.g
y1
distributionType: to be replaced by
logNormal
,normal
orlogitNormal
predictionName: to be replaced by a variable defined in the structural model, e.g
Cc
sdErr: to be replaced by a variable defined in the structural model representing the standard deviation of the random observation, e.g
sd = sdErr
withsdErr = b*Cc
defined in the EQUATION: block. Note that the variable representing the sd can vary over time and be defined using if/else statements.
Below we show an example of an error model that varies over time: before time 0.1, the residual error is zero, afterwards a proportional error model is used.
[LONGITUDINAL]
input = {Cc, IC50, E0, kout, b}
Cc = {use = regressor}
EQUATION:
kin = E0*kout
E_0 = E0
ddt_E = kin*(1 - Cc/(Cc + IC50)) - kout*E
if t<0.1
sdErr = 0
else
sdErr = b*E
end
DEFINITION:
yE = {distribution = normal, prediction = E, sd=sdErr}
OUTPUT:
output = {E, yE}
Rules and best practices
The arguments of the
errorModel
can not be calculations (e.gerrorModel=constant(a)
witha = 10*Cc
is not accepted), only parameters listed in the input list.A parameter can not be shared by two different
errorModel
arguments for two different observations.The argument sd cannot be directly a formula (e.g
sd = b*Cc
), an intermediate variable name must be used (e.gsd = sdErr
withsdErr=b*Cc
)