Select Page

Model implementation


Objectives: learn how to create a project by defining the model using the Graphical User Interface (GUI) and/or an external model file.


Projects: theo1_project, theo2_project, theo3_project, theo4_project


 

Use an external file for the structural model

  • theo1_project (data = ‘theophylline_data.txt’ , model= {‘theo1a_model.txt’, ‘theo1b_model.txt’})

In this example, the structural model is implemented in a external file.
You can edit this model by clicking on the mlxEditor button

theo1a_model.txt is a text file which contains an OUTPUT section where Cc is defined as the prediction for the observations

[LONGITUDINAL]
input = {ka, V, Cl}
EQUATION:
Cc=pkmodel(ka, V, Cl)
OUTPUT:
output = Cc

The other components of the model (the residual error model and the model for the individual PK parameters) are defined in the graphical user interface (GUI).

Instead of theo1a_model.txt, we can use theo1b_model.txt where no output is defined.

[LONGITUDINAL]
input = {ka, V, Cl}
EQUATION:
Cc=pkmodel(ka, V, Cl)

For changing the structural model, click on the button Model file and select the new model in the list

Since no output is defined in this model, the name of the variable used as a prediction for the observations should be provided in a GUI:

The project can be saved and used equivalently either with theo1a_model.txt or theo1b_model.txt.

Use an external file for the structural model and the residual error model

  • theo2_project (data = ‘theophylline_data.txt’ , model= {‘theo2a_model.txt’, ‘theo2b_model.txt’})

Both the structural model and the residual error model are defined in theo2a_model.txt

[LONGITUDINAL]
input = {ka, V, Cl, a}
EQUATION:
Cc=pkmodel(ka, V, Cl)
DEFINITION:
y1 = {distribution=normal, prediction=Cc, errorModel=constant(a) }
OUTPUT:
output = y1

Then, the residual error model cannot be modified anymore in the main GUI

The same model for the observations is implemented in theo2b_model.txt, but where no output is defined (y_1 should defined as the output in the GUI).

Use an external file for the complete model

  • theo3_project (data = ‘theophylline_data.txt’ , model= ‘theo3a_model.txt’)

The complete model is now defined in theo3a_model.txt

[COVARIATE]
input = {WEIGHT}
EQUATION:
lw70 = log(WEIGHT/70)
[INDIVIDUAL]
input = {Cl_pop, omega_Cl, V_pop, omega_V, ka_pop, beta_V_lw70, lw70, omega_ka}
DEFINITION:
Cl = {distribution=lognormal, typical=Cl_pop, sd=omega_Cl}
V = {distribution=lognormal, typical=V_pop, covariate=lw70, coefficient=beta_V_lw70, sd=omega_V}
ka = {distribution=lognormal, typical=ka_pop, sd=omega_ka}
[LONGITUDINAL]
input = {ka, V, Cl, a}
EQUATION:
Cc=pkmodel(ka, V, Cl)
DEFINITION:
y1 = { distribution=normal, prediction=Cc, errorModel=constant(a) }
OUTPUT:
output = y1

It is therefore not possible anymore to modify any component of the model from the GUI (all the graphical components are disabled).

Define the complete model in the project file

  • theo4_project (data = ‘theophylline_data.txt’, no model file)

The complete model is defined in the project itself. You can open the mlxEditor to edit the project itself

 

Section <MODEL> of the project contains the complete model.
Remark: Exactly the same syntax is used when the model – or a component of the model – is defined in the project or in an external file