Efficiently Calculating Cmax and AUC with 95% CI for 5th, 50th, and 95th Quartiles in Large Phoenix NLME Simulations

Hi Users and Experts,
I used Phoenix NLME to simulate concentration–time (CT) profiles for 56 subjects with 1000 replicates each, over 672 hours with 1‑hour sampling. This produced a dataset of ~37 million rows. Phoenix can open the file, but when I try to use it for further analysis (like NCA), the software hangs due to the dataset size.

My goal is to calculate Cmax and AUC with 95% confidence intervals for the 5th, 50th, and 95th quartiles for each subject. Reducing replicates or truncating the simulation isn’t an option in my case.

Looking Help;
What is the recommended workflow for handling such large simulation outputs in Phoenix NLME? Specifically:

How can I efficiently compute Cmax and AUC with 95% CIs for percentile curves per subject?

Is it better to summarize replicates outside Phoenix (e.g., in R) and then re‑import the reduced dataset?

Are there Phoenix settings or best practices to avoid hangs when performing NCA on large simulated datasets?
Thank you.

Hi Bhim, others like Samer have more practical experience and it may be that for these larger analyses you would be better running your code via RsNLME, this is free to use for all NLME licensees as well as academia in general.
https://certara.github.io/R-RsNLME/index.html

However I think these threads about directly calculating CMax and AUC, should save you having to run secondary NCAs on these large outputs.

Simon.

Unless you have a lot of RAM, you don’t want to handle gigabytes of data in the Phoenix GUI. Even then, it will be way too slow.
As Simon mentioned, to do so, you have to use R or any other programming language. The NCA module in Phoenix was never designed to process and handle simulated data with millions of profiles. If you just need Cmax and AUC0, there is no need for NCA, regression, or the overhead; you can compute them with a few lines of R code.
I have written my coveffectsplot vignettes using R and mrgsolve, but any R package can be used to simulate: RsNLME, nlmixr2, etc.

Simulating with uncertainty in Phoenix can be tricky, but the latest version would allow you to use the vcvfixef pml syntax, or you can have bootstrap merge with the data and then use “sort” by bootstrap replicate.
Unfortunately, simulation with uncertainty is not automated, and I have seen many scientists implementing it incorrectly. The latest FDA guidance requires simulation to inform dosing, include uncertainty, while including BSV depends on the use case.

Question to you: Do you really need the seq 0,672,1 scheme? Why did you select 1000 replicates? How did you account for the uncertainty in the estimates? What is the drug development question/decision you are trying to inform using these simulations?

Dear Simon,
Thank you for your valuable suggestions and I could execute it in R for both Cmax and AUClast. AUC I could get directly from model script using #deriv(AUCt1_t2 = (t>t1)*(t<t2)C). Thank you very much.

Bhim

Dear Samer,

Thank you very much for your valuable suggestion and I used R for Cmax and AUClast calculation.
Additionally you helped me to bring clarity on need for rich and long-time sampling, replicate simulation and question of interest. The study objective is to pediatric dose scaling from adult data. Specifically, the simulations were designed to evaluate whether proposed dose levels across defined pediatric weight groups achieve target adult‑equivalent exposures. I selected 1000 replicates to ensure that the simulation results were statistically stable and to get reliable confidence intervals around predicted exposures.

Uncertainty in the parameter estimates was accounted for by propagating variability from the adult model into the pediatric simulations. Uncertainty was reflected by Between‑subject variability and residual error. In addition, pediatric covariate variability (body weight) was explicitly modeled through the input dataset for simulation in pediatrics. However, I have missed uncertainty in fixed effect using vcvfixef pml syntax, or bootstrap merge.

I am thankful to you and looking for suggestion to incorporate uncertainty.

Thank you.

Bhim

uncertainty is the error on your estimates it has nothing to do with your BSV nor residual error:
The best paper to read is Yaning paper on precision criteria

it has the delta method and some R code at the end.

Think of it like so: you run a pediatric trial not to match adult exposure but to have a precise estimate of your CL/Volume because if you know CL and V with certainty, then you can just predict what the best dose to match the adult is, without the need to repeat the trial. Of course it is an icing on the cake if you could find out the best dose from the get go and match adult:
layers of variability:
CL estimate
covariate affecting CL : AGE, Weight , Genotype ( and inherent distribution)
effects of covriates on the parameter : shape power, categorical
unexplained BSV

the population fit will give you the estimate and associated SE on it you can also incoporate the “uncertainty” on your covariate observed distribution by resamplign it / bootstraping it in each replicate.

you can’t reduce / control BSV even if you change your dose it is not relevant unless you have a situation where you want to make sure the range of possible individual Cmax and or AUC are kept within limits due to some safety concerns ?