Setting the structural model
After creating a new project and loading a dataset, a structural model should be loaded and its output variables mapped to the measurement types from the data.
Loading or creating a model
In Monolix, structural models are provided as external .txt files, whose path is saved into the Monolix project.
There are three options to load a structural model:
Use the option “Browse” to load an existing file containing a structural model.
Use “Load from library” to select a model from the available model libraries. Models from the libraries are not saved as external files but are generated on-the-fly. Once loaded, it is possible to open the content of a library model, edit it and save it as an external file.
Use “New model” to open the built-in editor, write your own model using the Mlxtran language, and save it as an external file.
Format of the structural model
The content of the structural model file should follow the Mlxtran syntax, with two main rules:
The file has to start with [LONGITUDINAL], which is the section containing the structural model. In Monolix, the statistical part of the model (covariate effects, parameter distributions and error model) is defined through the graphical user interface. When saving a Monolix project, the statistical part of the model is automatically written directly in the .mlxtran project file using mlxtran language as additional sections [INDIVIDUAL] and [COVARIATE].
The rest of the content should be divided into different blocks to define different types of variables:
DESCRIPTION: (optional) to describe the content of the model
PK: (optional) to use PK macros
EQUATION: (optional) to define equations
DEFINITION: (optional) to define non-continuous variables
OUTPUT: (mandatory) to define the output variables.
When using the option “New model”, the built-in editor opens with an unsaved new file pre-filled with the usual structure:
Details on this syntax and the content of each block are given in Model syntax: mlxtran language
Models loaded from the libraries also follow the same structure, as on this example:
Mapping between the data and the model
After loading a model, its output variables should be mapped to the measurement types from the data.
A default mapping is set by Monolix by order, i.e. the first output listed in the output=
statement of the model is mapped to the first OBSERVATION ID (ordered alphabetically). The mapping can also be customized by the user.
This page explains in details how to use the mapping: Mapping between the data and the model