## Mlxtran
## Model typesThe mlxtran language can be used to describe a wide variety of models, including models for continuous, count, categorical and time-to-event data. The main output of a |
Mlxtran Language Cheat Sheet |

## Mlxtran model structure

Mlxtran can be used to represent models for parameter estimation with Monolix or for simulation with Simulx. In Monolix, the model file (with .txt extension) contains only the structural part of the model (section [LONGITUDINAL]), while 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 written in the .mlxtran project file using mlxtran language.

In Simulx, the model file contains the [LONGITUDINAL] section, but can also contain the [COVARIATE] and [INDIVIDUAL] sections to describe the statistical part of the model. When a Monolix project is imported into Simulx, the model with all sections is created automatically from the .txt monolix model file and .mlxtran monolix project file. When starting a Simulx project from scratch, the [LONGITUDINAL] section is mandatory and the [COVARIATE] and [INDIVIDUAL] sections are necessary if covariates and inter-individual variability are present in the model.

**[LONGITUDINAL]**: structural model and error model**[INDIVIDUAL]**: parameter distributions**[COVARIATE]**: covariate declaration and transformations**[POPULATION]**: only compatible for simulations with mlxR, in combination with MonolixSuite 2019 and before.

The sections are themselves divided into blocks, which allow to define different types of variables in different ways:

**DESCRIPTION**: block to put comments on the model**PK**: block were macros can be used to define compartments and transfers between them**EQUATION**: block were ODEs can be defined, as well as mathematical expressions (e.g parameter transformations)**DEFINITION**: block to define random variables (discrete or continuous) via their probability distribution- within the [LONGITUDINAL] section: error model, probability distribution for count/categorical output and hazard for time-to-event output
- within the [INDIVIDUAL] section: distribution of the parameters

**OUTPUT**: block indicating the output of the model

Below we show the possible sections and blocks for Monolix and Simulx.