Monolix
Auto Light Dark
Auto Light Dark

Example

In the proposed example, we use Sycomore to guide the modelling of the PKPD of remifentanil in Monolix, by providing and overview of the modelling workflow, and allowing to easily add a new step of the workflow by cloning a project to modify it.

We choose to perform a quick modelling workflow with the help of automatic model building tools, to find a good model in only a few steps.

All modelling decisions are only summarized.

Insights from data exploration

A detailed presentation and exploration of the remifentanil PKPD dataset that we wish to model is available here.

In summary, it contains:

  • administration information for IV infusion,

  • PK measurements of remifentanil: these observations are named y1 in Datxplore and Monolix,

  • EEG measurements as PD: these observations are named y2 in Datxplore and Monolix,

  • continuous covariates (age and lean body mass LBM), as well as categorical covariates (sex and tinfcat which is a dose group).

Data exploration with the data viewer in Monolix gives relevant insights to guide the modelling, mainly:

  • The elimination shows different phases, as can be seen on the left figure below, where the PK measurements over times have been split by dose group. This means that several compartments will be needed in the PK model to capture them.

  • The PD is inhibited by the PK with a delay, visible for example on the right figure below, which shows the PD over PK for id 15.


Monolix data viewer plot of remifentanil PK observations y_1 versus time on a log scale, split into four panels by dose group TINFCAT 10-14, 20, 4-5 and 7-8. Concentrations peak near 100 to 300 and then decline with several distinct elimination phases, suggesting multiple compartments are needed.



Monolix data viewer plot of the PD observation y_2, EEG, versus the PK observation y_1 for id 15, with points joined in time order. The curve forms a loop, with a red arrow showing direction, as y_2 drops from about 19 to about 5 and recovers, indicating a delayed PD inhibition by the PK.


First PK model

Since the data exploration in Monolix shows that a model with several compartments seems necessary to describe this dataset, we start by setting up a first PK model with two compartments in Monolix, with the following steps:

  • Load the structural model infusion_2cpt_ClV1QV2.txt from the PK library. This is a 2 compartments model with infusion administration and linear elimination.

  • Choose automatically good initial estimates for the population parameters with the “Auto-init” button in the tab “Initial estimates”.

  • Keep the default statistical model.

We save this first project as PK_1.mlxtran in a folder “PK”. Then, all estimation and diagnosis tasks are run to evaluate the model. In particular, the plots “Individual fits” and “Observations vs predictions” displayed below show a mis-specification of the structural model: a third compartment is needed in order to avoid under-predictions of the end of the elimination phase.

Since these plots are important to diagnose the model, we export these plots in the result folder with the button “Export as png”.


Monolix Individual fits plot for individuals 1 and 2 of model PK_1, concentration on a log scale versus time. The two-compartment prediction curve falls below the observed points at the end of the elimination phase, showing under-prediction and the need for a third compartment.



Monolix Observations versus Individual predictions plot for PK_1 on log-log axes. Points follow the identity line at high values but bend away from it below about 1, showing mis-specification at low concentrations. The export menu is open with the cursor on Export as png.


Finally, we note in the tab Comments the conclusion for this project: “Misspecification in diagnostic plots: 3rd cpt needed”.

Second PK model

Next, we change the structural model to add a third compartment to the PK model. This is done by loading the structural model infusion_2cpt_ClV1Q2V2Q3V2.txt. Good initial estimates are again chosen with the button “Auto-init”.

We then save the modified project as PK_2.mlxtran in the PK folder, before running all estimation and diagnosis tasks.

The plots “Individual fits” and “Observations vs predictions” displayed below no longer show any mis-specification of the structural model.


Monolix Individual fits plot for individuals 1 and 2 of model PK_2 with three compartments, concentration on a log scale versus time. The prediction curves now follow the observed points through the whole elimination phase, with no mis-specification.



Monolix Observations versus Individual predictions plot for PK_2 on log-log axes from about 0.1 to 300. Points lie tightly along the identity line across the whole range, with no deviation at low concentrations, so the three-compartment model has no structural mis-specification.


These plots are also exported in the Results folder. Moreover, we note in Comments: “No misspecification in structural model”.

We can also check in the plots for individual parameters that the distributions of the individual parameters are not misspecified.

Comparing two PK projects in Sycomore

To compare further these two projects, we create a new overview with Sycomore: after opening Sycomore and clicking on “New project”, we select the PK folder containing the two Monolix projects.

The two projects with their common folder then appear in the Selection panel on the left of the Hierarchy tab in Sycomore. After selecting them both, they also appear with their characteristics in the overview table on the top:


Sycomore Hierarchy tab with folder PK holding PK_1.mlxtran and PK_2.mlxtran in the Selection panel. The overview table lists both projects with minus 2LL IS 7945.98 versus 7150.89, BICc IS 8008.26 versus 7236.72, their structural models, observation model y1 comb1 and comments.


Since both projects contain the BICc computed by importance sampling, we can already see in the table that the second project PK_2 has a lower value for BICc (IS), which confirms that the fit is better. A rating can be added for each project. Here we note a rating ⭐ for PK_1 and a rating ⭐⭐ for PK_2.

To keep track of the workflow, add these two projects in the tree view by clicking on the + icons in the column “Hierarchy”. The rating appears as a color code, with PK_1 in red and PK_2 in orange. We then drag the node PK_2 close to PK_1 to create a parent-child relationship.


Sycomore tree view detail showing the cursor dragging node PK_2, orange, close to node PK_1, red, inside a green circle, which creates a parent-child link between the two projects.


It is now possible to comment the parent-child relationship to record the changes from the parent. We write “added 3rd cpt” in the corresponding cell in the table.

We have now recorded all elements of the current workflow, thus we save the Sycomore overview as a file PKPD_remifentanil.syc. The project now looks like this:


Sycomore Hierarchy tab after recording the workflow. PK_1 has a one-star rating and PK_2 two stars, both selected for Compare. The Changes from parent cell for PK_2 reads added 3rd cpt, and the tree view shows PK_1 linked to PK_2 with an info icon displaying added 3rd cpt.


Comparing PK_1 and PK_2 in more details is also possible by selecting them both in the column Compare. The tab Comparison is then generated and allows a side-by-side comparison of the results of the projects.


Sycomore Comparison tab table for PK_1 versus PK_2 with ratings, comments, minus 2LL importance sampling 7945.98 versus 7150.89 and BICc 8008.26 versus 7236.72. Fixed effects with RSE show Cl_pop 2.49 versus 2.46, V1_pop 5.24 versus 4.46, V2_pop 9.35 versus 7.83, and Q2, Q3 and V3 only for PK_2.


The estimates for Cl, V1 and V2 are quite close between the two projects.

The columns can be sorted according to the values of each row, and missing tasks can also be launched from there with the “run” buttons, for example if the log-likelihood has not been yet computed.

The exported plots in the section Figures can also be compared, for example as below by clicking on obspred_y1_0_0.png, which is the file name for the plot “Observation vs predictions”:


Sycomore Comparison tab with a pop-up showing the exported plot obspred_y1_0_0.png side by side for PK_1 and PK_2. The PK_1 Observations versus predictions plot deviates from the identity line at low values, while the PK_2 plot follows it across the whole range.


Note that we only mention a few diagnostic plots in this short case study to keep a simple workflow, however it is important to check all diagnostic plots to get a complete model diagnostic.

Adjusting the statistical model with Proposal

The structural model in PK_2 has been validated by the diagnostic plots and parameter estimation. We can now try to improve the statistical model with a different error model, covariate effects or correlations between random effects.

In a complete and detailed modelling workflow, it would be important to look at the diagnostic plots for correlations between covariates and individual parameters as well as between pairs of random effects, to detect possible effects of outliers or to identify relevant transformations for covariates before adding covariate effects. This step is neglected in this simple workflow.

For a quick improvement of the statistical model, we can look at the proposal section in the tab Results of PK_2, seen below. The aim of the Proposal is to estimate the best statistical model for the dataset, taking into account the residual error model, covariate effects and correlations between random effects.


Monolix Results tab, Proposal section, for PK_2. The proposed model, with an Apply link, uses a combined2 error model, AGE on all parameters, LBM on Cl and V1, and correlation group 1 for Cl, Q2, V2 and Q3, highlighted in yellow. The current model below uses combined1 with no covariates.


A model different than the current model is available in the tab Proposal. This proposed model includes a combined2 residual error model, covariate effects of Age on all parameters and LBM on Cl and V1, and a correlation group with the random effects of Cl, Q2, V2 and Q3. It is estimated that this model will be more performant than the current model, thus it is an interesting information that we can add in the Comments for PK_2.mlxtran with: “Statistical model can be improved”. We save PK_2.mlxtran to update its comments, and we can also update the Comments visible in Sycomore by clicking on the “refresh” button for PK_2 in the column Actions:


Sycomore table row for PK_2 with the Actions icons highlighted in green and the cursor on the refresh button. The Comments cell now also reads Statistical model can be improved.


However the performance of the proposed model should be verified by applying the model and estimating its parameters.

To do this, we choose the proposed model in Monolix by clicking on “Apply”, and save the modified project as PK_3.mlxtran. We run the scenario of tasks for this project, and check that the convergence of the estimates is good and that all parameters are estimated with a good confidence:


Monolix population parameter estimates for PK_3 with stochastic approximation SE and RSE. Fixed effects include Cl_pop 2.56, V1_pop 1.65, Q2_pop 3.36, V2_pop 14.6, Q3_pop 0.332, V3_pop 8.33 with AGE and LBM betas, plus omegas, six correlations and error parameters a 0.019 and b 0.109. Only beta_V1_AGE has a high RSE of 50.5.


Next, we add PK_3 in the workflow overview to compare it to the previous projects, by clicking on the icon “Rescan directory” next to the PK folder in the Selection panel, like this:


Sycomore Selection panel snippet with the PK folder holding PK_1.mlxtran and PK_2.mlxtran, and the cursor on the Rescan directory icon next to the PK folder.


This adds the project PK_3.mlxtran in the list of selected projects of the overview. It can now be added in the tree view as a child of PK_2, with the comment “Applied best proposal”.

As we can see on the table below, the BICc indeed indicates that PK_3 is more performant than PK_2, thus we choose the rating ⭐⭐⭐ for PK_3. Note that BICc values can be easily compared in this table by sorting the column BICc with the button marked on the figure.


Sycomore overview table sorted by BICc IS, the sort button highlighted in green. PK_3 has the lowest BICc, 7013.82 versus 7236.72 for PK_2 and 8008.26 for PK_1, a three-star rating, observation model comb2 and covariates AGE and LBM. The tree view links PK_1 to PK_2 to PK_3.


In the tab Results of Monolix for PK_3, we see that PK_3 also has a proposed model available, where a covariate effect of Sex is also included on V3, therefore, we finalize PK_3 with a comment “Proposed model available” and save.

If the proposal at the previous step has been efficient, we should not expect a large improvement of the objective function value with this new covariate effect. To check this, we apply again the best proposed model and save the modifications in a project PK_4.mlxtran. As before, it is important to not only run the scenario, but also check the convergence of the estimates and their standard errors.

Once this is done, we add PK_4 to the overview in Sycomore. Since the table is still sorted by BICc, it is quickly visible that PK_4 actually has a higher BICc than PK_3. Therefore, we choose a rating ⭐⭐ for PK_4 and we consider PK_3 as more performant.


Sycomore Hierarchy tab with four projects. PK_4, with covariates AGE, LBM and SEX, has BICc IS 7095.34, higher than 7013.82 for PK_3, and a two-star rating while PK_3 keeps three stars. The tree view shows the chain PK_1, PK_2, PK_3, PK_4.


We can now consider PK_3 as the final PK model. To save this decision in the comments of the project, it is possible to open again the project in Monolix directly from Sycomore, by clicking on the “Monolix” icon in the row for PK_3:


Sycomore table row for project PK_3 with action icons. The mouse cursor hovers the Monolix icon, showing the tooltip Open project, used to reopen PK_3 in Monolix. Three orange rating stars are visible on the right.


After completing the comments and saving the project, the comments displayed in Sycomore can be updated with the “refresh” button.

Joint PK-PD model

We next would like to develop a joint model for the PK and the PD. We choose to try two different PD models that could take into account the delay between remifentanil concentration and decrease of EEG, revealed by the data exporation:

  • Model 1: a direct inhibition model with an effect compartment.

  • Model 2: a turnover model with PD production inhibition by the PK.

Here are the equations for EEG (PD observations) for both models:


Equations of the EEG effect for the two PD models. Model 1, direct inhibition with effect compartment, EEG equals EEG0 times 1 minus Imax times Ce to the gamma over Ce to the gamma plus IC50 to the gamma. Model 2, turnover, dEEG over dt equals ksyn times 1 minus Imax times Cc to the gamma over Cc to the gamma plus IC50 to the gamma, minus kdeg times EEG.


We will now define two projects with these two models, available in the libraries of Monolix, and we will then run the two projects in a row from Sycomore.

Since both PKPD models will be based on the final PK model, we start by creating two clones of PK_3 in Sycomore with the button “Clone project” (note that the action “Clone project” is also available by clicking on the node for PK_3 in the tree view):


Sycomore table row for project PK_3. The mouse cursor hovers the second action icon, showing the tooltip Clone project, used to create the PKPD projects as clones of PK_3.


We save each cloned project in a new folder named PKPD, under the names PKPD_1.mlxtran and PKPD_2.mlxtran. The cloned project are automatically included in the panel selection and the tree view as children nodes of PK_3:


Sycomore Selection panel tree with the folder PKPD_remifentanil containing a PK folder with PK_1 to PK_4.mlxtran and a new PKPD folder with PKPD_1.mlxtran and PKPD_2.mlxtran, all checked.



Sycomore tree view of the workflow. PK_1, red node, leads to PK_2, orange, then to PK_3, green. PK_3 has three children, PK_4 in orange and the new grey nodes PKPD_1 and PKPD_2. Info icons sit on each link.


Let’s now open PKPD_1.mlxtran in Monolix to add the first PD model.

The project has been saved with the comments of PK_3, that we can delete, and the results of PK_3, which means that the PK parameters estimated with PK_3 are available. We start by defining these estimated parameters as new initial values, by clicking on “Use last estimates: all”  in the tab “Initial estimates”. Then, we choose to fix all the PK population parameters: the goal is to perform a quick estimation of only the PD population parameters that will be added later in the model. To fix all population parameters, we click on “Fix parameters values: All” in the tab “Initial estimates”:


Monolix Initial estimates tab for PKPD_1 showing population parameters with covariate effects, such as Cl_pop about 2.56, V1_pop about 1.65, Q2_pop about 3.36, their omegas, beta AGE and beta LBM, and residual error parameters a, b and c for y1. The cursor clicks All next to Fix parameters values at top right.


Note that this method is easy to implement in the interface of Monolix and allows to estimate only the PD population parameters, however all individual parameters will be estimated, including the PK parameters. Therefore, it will take longer than a fully sequential approach where individual PK parameters from the PK analysis are included in the dataset to be used for predictions.

We can now complete the structural model with a PD model. In the tab “Structural model”, we load a model from the PKPD models library, corresponding to the same PK model as before, with a partial inhibition PD model with effect compartment and with sigmoidicity.

We choose good initial values for the PD parameters in the panel “Check initial estimates” of the tab “Initial estimates”. The auto-init is only available for models from the PK library, therefore we have to choose manually some values that give a reasonnable fit to the data, for example ke0_pop=1, gamma_pop=2, E0_pop=20, Imax_pop=0.9, IC50_pop=10. We can then save the modified project. Since the project will be run from Sycomore, we make sure that all the tasks of the scenario are selected and saved.

We follow the same steps as for PKPD_1.mlxtran to define the second PD model in PKPD_2.mlxtran. Here we choose a PKPD model where the PD model is a turnover model with partial inhibition of the production and with sigmoidicity. We can take for initial values kout_pop=1, gamma_pop=2, R0_pop=20, Imax_pop=0.9, IC50_pop=10.

Once both projects have been defined and refreshed in Sycomore, we can launch their scenarios directly from Sycomore, by clicking in the table on the two names PKPD_1 and PKPD_2. The projects are then colored in green. The list of selected projects can then be run in a row with the button “Run”. A pop-up window opens to display the progess of the runs:


Sycomore Hierarchy tab with PKPD_1 and PKPD_2 highlighted in green in the project table, selected to run. A progress pop-up shows PKPD_1.mlxtran in SAEM exploratory phase, iteration 42 of 500, with a Stop button. The tree view below shows both PKPD nodes as children of PK_3.


After the two runs have finished, we finally select the two PKPD projects for side-by side comparison, to check their results, in particular the estimated values and standard errors. In both cases, the parameters have been estimated with a good confidence.

To compare the diagnostic plots, it is necessary to open the projects in the interface of Monolix to generate the plots and export them as png images. The comparison of the VPC for example shows that both models have a good predictive power:


Sycomore Comparison tab with a pop-up showing vpc_y2_0_0.png side by side for PKPD_1 and PKPD_2. Both VPCs of the EEG observation y2 versus time show a sharp drop then recovery, with empirical percentiles mostly inside the blue and pink prediction intervals and a few red outlier areas at early times, indicating good predictive power for both models.


Finally, the comparison of the BICc values indicate that the model 1 is slightly more performant than model 2.


Sycomore comparison table of the two PKPD projects. Minus 2 log-likelihood by importance sampling is 23892.17 for PKPD_1 versus 24264.05 for PKPD_2, and BICc by importance sampling is 23998.97 versus 24370.84, so PKPD_1 has the lower BICc.


To visualize this difference on the tree view, we choose a rating ⭐⭐⭐ for PKPD_1 and ⭐⭐ for PKPD_2.

Conclusion

We built a quick joint PKPD model for remifentanil in Monolix, with the help of structural model libraries and automatic statistical model building tools implemented in Monolix.

This example illustrates how Sycomore can be used to:

  • track the steps of the modelling workflow and see at a glance the main elements of each step,

  • easily add a new step of the workflow by cloning a Monolix project,

  • save the changes between successive runs,

  • compare side-by-side the results of similar models,

  • run sets of Monolix projects.

All the material of this case study (data, Monolix projects and Sycomore overview) can be downloaded here: PKPD_remifentanil_workflow_sycomore.zip

Last updated: