Simulx
Auto Light Dark
Auto Light Dark

Import a Monolix project

There are three methods to start a project in Simulx: create a new project, open an existing project and import a project from Monolix or PKanalix. To import a project from Monolix is as simple as clicking on the button “Import from Monolix” in the Simulx home tab. It is the easiest way to build a simulation scenario, because everything to run a simulation is prepared automatically. As a result, it saves a lot of time.You can always modify current simulation elements, define new ones and change the scenario, so the flexibility of Simulx is not compromised.

Simulx 2023R1 home screen, Projects tab, with NEW PROJECT, OPEN PROJECT and IMPORT FROM buttons. The IMPORT FROM menu is open and its Monolix option is highlighted, above PKanalix.

Simulx project structure

Importing a project from Monolix creates a Simulx project with predefined elements. You can use them to re-simulate the dataset from the Monolix project or as a base for a new simulation scenario. These elements appear in the Definition tab:

  • Model, population parameters and individual parameters estimates and output variables are imported from Monolix.

  • Occasions, covariates, treatments and regressors are imported from the dataset (used in the imported Monolix project).

Simulx sets default exploration and simulation scenarios – they are ready to run. They contain one exploration group to simulate a typical individual (in the exploration tab) and one simulation group to re-simulate the Monolix project (in the simulation tab).

Default simulation elements

  • model: mlxtran model with blocks [INDIVIDUAL], [COVARIATE] and [LONGITUDINAL].

  • pop.params.:

    • mlx_PopInit [no POP.PARAM task results]: (vector) initial values of the population parameters from Monolix.

    • mlx_Pop: (vector) population parameters estimated by Monolix.

    • mlx_PopUncertainSA (resp. mlx_PopUncertainLin): (matrix) an element which enables to sample population parameters using the covariance matrix of the estimates computed by Monolix if the Standard Error task (Estimation of the Fisher Information matrix) was performed by stochastic approximation (resp. by linearization). To sample several population parameter sets, this element needs to be used with replicates.

  • indiv.params.:

    • mlx_IndivInit [no POP.PARAM task results]: (vector) initial values of the population parameters from Monolix.

    • mlx_PopIndiv: (vector) population parameters estimated by Monolix.

    • mlx_PopIndivCov: (table) population parameters with the impact of the covariates used in the model (but no random effects).

    • mlx_EBEs: (table) EBEs (conditional mode) estimated by Monolix.

    • mlx_CondMean: (table) conditional mean estimated by Monolix.

    • mlx_CondDistSample: (table) one sample of the conditional distribution (first replicate in Monolix).

  • covariates [if used in the model]:

    • mlx_Cov: (table) ids and covariates read from the dataset.

    • mlx_CovDist: (distribution) distribution of covariates from the dataset with empirical mean and variance for continuous covariates, set as lognormal for positive continuous covariates, normal for continuous covariate with some negative values, and multinomial low based on frequencies of modalities for categorical covariates.

  • treatment:

    • mlx_AdmID: (table) ids, amounts and dosing times (+ tinf/rate or washouts) read from the dataset for each administration type.

  • outputs:

    • mlx_observationName: (table) ids and measurement times read from the dataset for each output of the observation model

    • mlx_predictionName: (vector) uniform time grid with 250 points on the same time interval as the observations for each continuous output of the structural model.

    • mlx_TableName: (vector) uniform time grid with 250 points on the same time interval as the observations for each variable of the structural model defined as table in the OUTPUT block.

  • occasions:

    • mlx_Occ [if used in the model]: (table) ids, times and occ(s) read from the dataset.

  • regressors: 

    • mlx_Reg [if used in the model]: (table) ids, times and regressor values and names read from the dataset.

Default scenarios

Exploration:

  • Indiv.params: mlx_IndivInit or mlx_PopIndiv.

  • Treatment: one exploration group with mlx_AdmId for all administration IDs.

  • Output: mlx_predictionName for all predictions defined in the model.

Simulx Exploration tab after import from Monolix. Indiv.params uses mlx_PopIndiv, explorationGroup1 uses treatment mlx_Adm1, and outputs are mlx_Cc and mlx_R. Plots show Cc rising quickly to about 12 then decreasing, and R dropping from about 95 to about 16 near time 65 before rising again. The right panel lists parameters Tlag, ka and V.

Simulation:

  • Size: number of individuals read from the dataset.

  • Parameters: mlx_PopInit or mlx_Pop.

  • Treatment: mlx_AdmId for all administration IDs.

  • Output: mlx_observationName for all observations.

  • Covariates: mlx_cov if used in the model.

  • Regressor: mlx_reg if used in the model.

Simulx Simulation tab with the default scenario after import from Monolix, single simulation. The highlighted shared group has group size 32, parameters mlx_Pop, treatment mlx_Adm1, outputs mlx_y1 and mlx_y2, and covariates mlx_Cov, ready to run with the SIMULATION and RUN task buttons.

Interface allows to have an overview on all defined elements, modify them and create new ones as well as build simulation scenarios. But,  if you modify the imported model, then Simulx will remove all simulation elements. In addition, if you remove occasions, then all occasion-dependent simulation elements will be removed as well.

A typical simulation workflow

The projects shown here are available as demo projects in the interface “1.overview/importFromMonolix_xxx.smlx”.

Simulx 2021R1 home screen, Demos tab, 1.overview folder. Highlighted demo projects are importFromMonolix_clinicalTrial, importFromMonolix_clinicalTrial_uncertainty, importFromMonolix_compareTreatments and importFromMonolix_resimulateProject.

This example is based on a PK-PD model for Warfarin developed and estimated in Monolix. The Warfarin dataset contains concentration and PCA(%) measurements for 32 individuals, who received different oral doses of the drug. Firstly, the goal of the Simulx project is to use the information from the Monolix project to test the efficacy and safety conditions for different treatments. Secondly, to simulate clinical trials and compare various dosing regimens strategies. Simulations should answer the following questions:

  • Which “loading dose” strategy assures a rapid steady state without a concentration peak?

  • Do multi-dose treatments meet the efficacy and safety criteria?

  • What is the uncertainty of the percentage of individuals in a target due to the variability between individuals and due to the size of a trial group?

Model:
The PK model includes an administration with a first order absorption and a lag time. It has one compartment and a linear elimination. The PD model is an indirect turnover model with inhibition of the production. All individual parameters have log-normal distribution besides the Imax parameter, which is logitNormally distributed. In addition, the log-transformed scaled weight covariate explains intra-individual variability of the volume, age covariate has an effect on the clearance and sex covariate on the baseline response. Finally, the combined-1 error model is used in the observation model of the concentration, and the constant model of the response.

0. Re-simulation of the Monolix project

[Demo project “1.overview – importFromMonolix_resimulateProject.smlx”]

You can download the Monolix project for this example, here. To import it in SImulx, first unzip the folder, then start a Simulx session, click on “Import from: Monolix” and browse the .mlxtran file. After importing a project from Monolix, the task buttons “simulation” and “run” in the Simulation tab re-simulate the project. Plots and results are generated automatically. Results are tables for outputs and individual parameters and plots display model observations as individual outputs and distributions.

Simulx Plots tab, Individual output for y1 after re-simulating the Monolix project. Blue individual concentration curves versus time from 0 to 120 peak near 10 to 15 early, then decline, with a black mean line and standard deviation error bars. Display settings show Lines, Mean and Error bars on.
Simulx Plots tab, Output distribution for y1 versus time 0 to 120 for the re-simulated Monolix project. A black median line peaks near 11 and decreases to about 2, surrounded by 9 blue percentile bands at a 90 percent level that widen after the peak.

1. Exploration of the loading dose strategies

[Demo project “1.overview – importFromMonolix_compareTreatments.smlx”]

Exploration tab simulates a typical individual. After importing a project from Monolix (the same as in the previous example), you can choose different types of individual parameters elements, eg. equal to population parameters estimated by Monolix or EBEs. Using several exploration groups allows to compare different treatments in one chart. The goal of this example is to test how many days of a “loading dose” are necessary to reach a steady state without a peak of the concentration. Starting dosing regimens are:

  • 1 day with a load dose 12mg OD followed by 13 days with a 6mg single dose OD

  • 1 day with a load dose 12mg OD followed by 13 days with a 4mg single dose OD

  • 1 day with load doses 4mg twice a day (BID) followed by 26 doses of 2mg every 12 hours.

“Loading dose” treatments elements are of manual type (with time of a dose and amount), while multi-dose elements are of regular type. Regular type includes a specification of a treatment period, inter-dose interval and number of doses. You combine treatments elements directly in the exploration tab (in the left panel).

Simulx treatment element dialog regDose_BID2mg of regular type for administration 1. The highlighted values are start time 24, interdose interval 12, 26 doses and amount 2. Repeat, Scale amount by a covariate and Non-compliance probability are unchecked.

Output is the concentration prediction Cc and the response prediction R on a regular time grid over the whole treatment period (t = 0:1:336) . The plot displays one subplot per output, and all exploration groups (=dosing regimen) together on each subplot. In the right panel, you can edit treatment elements and parameters  interactively – predictions are updated on-the-fly for all groups to help you find which exact regimen is the most promising.

Simulx Exploration tab comparing three loading dose regimens over 336 hours. Groups combine loadDose_BID4mg with regDose_BID2mg, loadDose_OD12mg with regDose_OD6mg, and loadDose_OD12mg with regDose_OD4mg. Cc plots show OD regimens with large peaks and troughs and a smoother BID curve, R plots decrease toward about 30 to 40. Regimen values are edited on the right.

2. Treatment comparison: percentage of individuals in the target

[Demo project “1.overview – importFromMonolix_compareTreatments.smlx”]

Simulation scenario

Exploration tab performed simulation on one individual. In the simulation tab, Simulx simulates a population of individuals. SImulation outputs can be further post-processed to calculate, for example, the percentage of individuals in the target for different treatment arms. This simulation scenario uses the following treatment and output elements.

  • BID treatment: One day of a “loading dose” with 4mg or 6mg dose twice a day (BID), followed by 26 doses of 2mg or 3 mg respectively each 12 hours.

  • OD treatment: One day of a “loading dose” with 8mg or 12mg dose once a day (OD), followed by 13 doses of 4mg or 6 mg respectively each 24 hours.

  • Outputs: manual type using model predictions (Cc and R) at time equal 336h.

In the simulation tab, the button “plus” adds a new group and “arrows” (green frames below) move elements from the shared section to the group specific section. For treatment, each group has a specific combination of treatments (blue frame). In addition, the option “same individuals among groups” removes the effect of intra-individual variability between individuals (red frame). As a consequence, the observed differences between groups are only due to the treatment and simulation can use a smaller number of individuals.

Simulx Simulation tab with four groups gr_BID_lowDose, gr_OD_lowDose, gr_BID_highDose and gr_OD_highDose, group size 50, parameters mlx_Pop, outputs Ctrough_day14 and Response_day14 and covariates mlx_CovDist. Highlights show the New group button, arrows to make treatments group specific, the group treatment pairs, and Same individuals among groups checked.

The comparison between groups is in terms of the percentage of individuals in the efficacy and safety target:

  • Efficacy: PCA at the end of the treatment should be less than 60%.

  • Safety: Ctrough on the last treatment day should be less than 2ug/mL.

You can calculate it in the outcomes&endpoints section of the simulation tab. Definition of new outcomes includes selecting an output computed in the simulation scenario and post-processing methods. When you apply threshold condition, then outcome is of a binary (true/false) type.

Simulx outcome dialog outcome_efficacy. The output Response_day14 is selected and highlighted, output processing is average value per id, and Apply threshold is checked with less than or equal to 60, making the outcome true or false.

In addition, outcomes can be combined together (blue frame below), and an endpoint summarizes “true” outcomes over all individuals in groups.

Simulx Outcomes and endpoints section. endpoint1 combines the highlighted outcome_efficacy and outcome_safety with the and combination, and the endpoint is Percent true. Group comparison is switched off, with gr_BID_lowDose as reference group.

Analysis

Similarly to the task button “Simulation”, which runs the simulation, the “Outcomes & endpoint” button performs post-processing, which in this example means calculating the efficacy and safety criteria and the number of individuals in the target. When you run this task, SImulx generates automatically the results in the “endpoint” section and plots for outcomes distributions.

Simulx Plots tab, Outcome distribution of Target_outcome as stacked bars of number of individuals out of 50 per group. True counts are about 37 for gr_BID_lowDose, 34 for gr_OD_lowDose, 15 for gr_BID_highDose and 22 for gr_OD_highDose, so the low dose BID group has the most individuals in the target.

In this example, the outcome distribution compares the number of individuals in the target between groups. The highest number of “true” outcomes is in the group with the low level dose twice a day (gr_BID_lowDose). Failure to satisfy the safety criteria by the two groups with the high dose level causes large numbers of “false” outcomes. In fact, the endpoint results show that for these two groups less than half of the individuals have Ctrough below the safety threshold (blue frame below).

Simulx Results tab, Endpoints, Outcomes Summary. outcome_efficacy is true for 41, 40, 50 and 50 of 50 individuals in gr_BID_lowDose, gr_OD_lowDose, gr_BID_highDose and gr_OD_highDose. outcome_safety is true for 42, 46, 16 and 22, with the high dose rows highlighted as fewer than half below the threshold.

3. Clinical trial simulation and uncertainty of the results

[Demo project “1.overview – importFromMonolix_clinicalTrial.smlx”]

The previous step shows that the high dose level violates the safety criteria in more than 50% of individuals. Therefore, the simulation of a clinical trial uses only one dose level with the BID and OD administration.

The goal is to analyse the effect of the uncertainty due to the variability between individuals, measurement errors and number of individuals in a trial.

New simulation scenario has four groups which combine different dosing regimens (BID or OD) with different group sizes (30 or 100). Outputs are model observations at the end of the treatment. To simulates the scenario several times (green frames), use the option “replicates”. As a result, the endpoints summarize the outcomes not only over the groups but also over the replicates.

[Starting from the demo project “1.overview – compareTreatments.smlx”, change number of replicates to 100, and add two groups: one with treatment as for GR_BID, other as GR_OD. Move “number of ids” as group specific, and set N=30 for one BID-OD pair and N=100 for the other.  Change names to indicate group sizes.]

Simulx Simulation tab of the clinicalTrial demo with 100 replicates and four groups gr_BID_N30, gr_OD_N30, gr_BID_N100 and gr_OD_N100 with group sizes 30, 30, 100 and 100. The highlighted Group comparison is on, with statistical test, oddsRatio not equal to 1, p-value 0.05 and reference group gr_BID_N30.

After running both tasks, plots display the endpoint distribution as a box plot with the mean value (dashed line) and standard deviations for each group. As expected, the uncertainty is lower for trial with more individuals. However, the mean values remain at similar levels.

Simulx box plot of the endpoint percentage in target over 100 replicates per group. gr_BID_N30 is centered near 60 with a range of about 33 to 80, gr_OD_N30 near 67, gr_BID_N100 near 60 with a narrow box from about 58 to 63, and gr_OD_N100 near 66. The groups with 100 individuals show less spread.

“Group comparison” option in the Outcomes&endpoints section compares the endpoints values across groups (blue frame). Selecting different reference groups and hypothesis (through the odds ratio) allows to change the objectives. Moreover, calculation of new outcomes or endpoints do not require re-running a simulation because the post-processing is a separate task.

The statistical test checks if any of the dosing regimens, BID or OD, is better than the other. Firstly, in the smaller trial so the gr_BID_N30 group is the reference and the hypothesis states that the odds ratio is different from one. For each replicate, if the p-value is lower than selected 0.05, then a test group (GR_OD_N30) is a “success”. Results summary in the “group comparison” section shows that only 5% of the test group replicates are successful (upper image below), which suggests that OD dosing regimen is not significantly better than BID. Larger trial size might give different results. Change reference group to gr_BID_N100 and re-run the outcomes & endpoints task. Percentage of successful replicates for gr_OD_N100 is higher, 8%, (lower image below), but it is comparable to the previous result.

Simulx Results tab, Group comparison Summary, Percentage of success over replicates with gr_BID_N30 as reference. The highlighted GR_OD_N30 succeeds in 5 percent of replicates, GR_BID_N100 in 2 and GR_OD_N100 in 7.
Simulx Group comparison Summary, Percentage of success over replicates with gr_BID_N100 as reference. GR_BID_N30 succeeds in 2 percent of replicates, GR_OD_N30 in 3, and the highlighted GR_OD_N100 in 8.

4. Propagation of parameter uncertainty to the predictions

[Demo project in 2021 version only “1.overview – importFromMonolix_clinicalTrial_uncertainty.smlx”]

In the previous step, we replicated the study 100 times to check the impact of sampling different individuals on the endpoint, and on the power of the study. For all these replicates, we sampled individuals using the same population parameters (so same typical values and deviations of random effects).

The goal of this final step is to check the impact of the uncertainty of population parameter estimates on the final endpoint and study power. For this, starting from the 2021 version, it is possible to use the population parameter element mlx_PopUncertainSA (resp. mlx_PopUncertainLin) if standard errors have been computed by stochastic approximation in the original Monolix project (resp. by linearization). Now the 100 replicates will be samples using each time different population parameter values, which are sampled from the variance-covariance matrix of the estimates imported from Monolix.

Simulx Simulation tab of the clinicalTrial_uncertainty demo with 100 replicates and groups gr_BID_N30, gr_OD_N30, gr_BID_N100 and gr_OD_N100. The highlighted Parameters drop-down selects mlx_PopUncertainSA among mlx_Pop, mlx_PopIndiv, mlx_PopIndivCov, mlx_CondMean, mlx_EBEs and mlx_CondDistSample.

When running again simulation and outcomes with this population parameter element, we obtain a higher uncertainty on the endpoint than in step 3, since now we observe in addition the uncertainty related to the estimation of parameters in Monolix.

Simulx box plot of the endpoint percentage in target over 100 replicates, with population parameter uncertainty, for groups gr_BID_N30, gr_OD_N30, gr_BID_N100 and gr_OD_N100. Dashed means are about 60, 65, 58 and 64 percent. Boxes and whiskers are wide, whiskers spanning about 37 to 90 percent, showing higher uncertainty than without parameter uncertainty.


Last updated: