- Purpose
- Calculations: the SAEM algorithm
- Running the population parameter estimation task
- Outputs
- In the graphical user interface
- In the output folder

- Settings

### Purpose

The estimation of the population parameters is the key task in non-linear mixed effect modeling. In Monolix, it is performed using the **Stochastic Approximation Expectation-Maximization (SAEM) algorithm** [1]. SAEM has been shown to be extremely efficient for both simple and a wide variety of complex models: categorical data [2], count data [3], time-to-event data [4], mixture models [5–6], differential equation based models, censored data [7], … The convergence of SAEM has been rigorously proven [1] and its implementation in Monolix is particularly efficient. No other algorithms are available in Monolix.

### Calculations: the SAEM algorithm

*[under construction]*

### Running the population parameter estimation task

The pop-up window which permits to follow the progress of the task is shown below. The algorithm starts with a small number (5 by default) of burn-in iterations for initialization which are displayed in the following way: (note that **this step can be so fast that it is not visible by the user**)

Afterwards, the evolution of the value for each population parameter over the iterations of the algorithm is displayed. The **red line** marks the switch from the exploratory phase to the smoothing phase. The exact value at each iterations can be followed by hovering over the curve (as for Cl_pop below). The **convergence indicator** (in purple) is a measure related to the likelihood (but not directly the likelihood) which helps to detect that convergence has been reached. It is used, among other measures, in the auto-stop criteria.

#### Dependencies between tasks:

The “Population parameter” estimation task must be launched before running any other task. To skip this task, the user can fix all population parameters. If all population parameters have been set to “fixed”, the estimation will stop after a single iteration and allow the user to continue with the other tasks.

### Outputs

#### In the graphical user interface

The estimated population parameters are displayed in the `Pop. Param`

section of the `Results`

tab. Fixed effects are named “*_pop”, the standard deviation of the random effects “omega_*”, parameters of the error model “a”, “b”, “c”, the correlation between random effects “corr_*_*” and parameters associated to covariates “beta_*_*”.

When the “Standard errors” task has also been run, the standard error (s.e), relative standard error (r.s.e) and p-values for covariate betas are also displayed in this result section. The total elapsed time for this task is shown at the bottom.

#### In the output folder

After having run the estimation of the population parameters, the following files are available:

**summary.txt**: contains the estimated population parameters, in a format easily readable by a human (but not easy to parse for a computer)**populationParameters.txt**: contains the estimated population parameters (by default in csv format)**predictions.txt**: contains for each individual and each observation time, the observed data (y), the prediction using the population parameters and population median covariates value from the data set (popPred_medianCOV), the prediction using the population parameters and individual covariates value (popPred), the prediction using the individual approximate conditional mean calculated from the last iterations of SAEM (indivPred_SAEM) and the corresponding weighted residual (indWRes_SAEM).**IndividualParameters/estimatedIndividualParameters.txt**: individual parameters corresponding to the approximate conditional mean, calculated using the last estimations of SAEM (*_SAEM)**IndividualParameters/estimatedRandomEffects.txt**: individual random effects corresponding to the approximate conditional mean, calculated using the last estimations of SAEM (*_SAEM)

More details about the content of the output files can be found here.

### Settings

The settings are accessible through the interface via the button next to the parameter estimation task.

*Burn-in phase*:

The burn-in phase corresponds to an “initialization” of SAEM. **Note**: the meaning of the brun-in phase in Monolix is different to what is called burn-in in Nonmem algorithms.

**Number of iterations**(default: 5): number of iterations of the burn-in phase

*Exploratory phase*:

**Auto-stop criteria**(default: yes): if ticked, auto-stop criteria are used to automatically detect convergence during the exploratory phase. If convergence is detected, the algorithm switches to the smoothing phase before the maximum number of iterations.**Maximum number of iterations**(default: 500, if auto-stop ticked): maximum number of iterations for the exploratory phase. Even if the auto-stop criteria are not fulfilled, the algorithm switches to the smoothing phase after this maximum number of iterations.**Minimum number of iterations**(default: 150, if auto-stop ticked): minimum number of iterations for the exploratory phase. This value also corresponds to the interval length over which the auto-stop criteria are tested. A larger minimum number of iterations means that the auto-stop criteria are harder to reach.**Number of iterations**(default: 500, if auto-stop unticked): fixed number of iterations for the exploratory phase.**Step-size exponent**(default: 0): The value, comprised between 0 and 1, represents memory of the stochastic process, i.e how much weight is given at iteration k to the value of the previous iteration compared to the new information collected. A value 0 means no memory, i.e the parameter value at iteration k is build based on the information collected at that iteration only, and does not take into account the value of the parameter at the previous iteration.**Simulated annealing**(default: enabled): the Simulated Annealing version of SAEM permits to better explore the parameter space by constraining the standard deviation of the random effects to decrease slowly.**Decreasing rate for the variance of the residual errors**(default: 0.95, if simulated annealing enabled): the residual error variance (parameter “a” for a constant error model for instance) at iteration k is constrained to be larger than the decreasing rate times the variance at the previous iteration.**Decreasing rate for the variance of the individual parameters**(default: 0.95, if simulated annealing enabled): the variance of the random effects at iteration k is constrained to be larger than the decreasing rate times the variance at the previous iteration.

*Smoothing phase*:

**Auto-stop criteria**(default: yes): if ticked, auto-stop criteria are used to automatically detect convergence during the smoothing phase. If convergence is detected, the algorithm stops before the maximum number of iterations.**Maximum number of iterations**(default: 200, if auto-stop ticked): maximum number of iterations for the smoothing phase. Even if the auto-stop criteria are not fulfilled, the algorithm stops after this maximum number of iterations.**Minimum number of iterations**(default: 50, if auto-stop ticked): minimum number of iterations for the smoothing phase. This value also corresponds to the interval length over which the auto-stop criteria is tested. A larger minimum number of iterations means that the auto-stop criteria is harder to reach.**Number of iterations**(default: 200, if auto-stop unticked): fixed number of iterations for the smoothing phase.**Step-size exponent**(default: 0.7): The value, comprised between 0 and 1, represents memory of the stochastic process, i.e how much weight is given at iteration k to the value of the previous iteration compared to the new information collected. The value must be strictly larger than 0.5 for the smoothing phase to converge. Large values (close to 1) will result in a smoother parameter trajectory during the smoothing phase, but may take longer to converge to the maximum likelihood estimate.

**Methodology for parameters without variability (if parameters without variability are present in the model):**

The SAEM algorithm requires to draw parameter values from their marginal distribution, which does not exist for parameters without variability. These parameters are thus estimated via another method, which can be chosen among:

**No variability (default choice)**: After each SAEM iteration, the parameter without variability are optimized using the Nelder-Mead simplex algorithm. The absolute tolerance (stopping criteria) is 1e-4 and the maximum number of iterations 20 times the number of parameters to calculate via this algorithm.**Add decreasing variability:**an artificial variability is added for these parameters, allowing estimation via SAEM. The variability is progressively forced to zero, such that at the end of the estimation process, the parameter has no variability.**Variability in the first stage**: during the exploratory phase, an artificial variability is added and progressively forced to zero. In the smoothing phase, the Nelder-Mead simplex optimization algorithm is used.

### Good practice and tips

*[under construction]*