metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
129 stars 36 forks source link

Feature brainstorming: Automatic steady-state? #850

Open billdenney opened 3 years ago

billdenney commented 3 years ago

As you can tell from the previous two issues that I just submitted, I'm having a lot of thoughts about steady-state. I'm running a clinical trial simulation where the system comes to steady-state in about 2 weeks. After that, it's all just time within the dosing interval and residual variability differences for how each measurement behaves.

It would be handy if I could tell mrgsolve to try to find steady-state automatically in a simple way.

What I have done for the current simulation is a lot of mucking about and playing with the time variable so that it takes advantage of the speed of steady-state calculation while taking advantage of the simplicity of different data management.

The specific algorithm that I'm thinking of is something like the following (with an indicator of SS=-1 in the dataset to take advantage of these automatic features):

billdenney commented 3 years ago

The first issue I see with this is something like auto-regressive residual error, but that would be a problem for normal SS == 1 records, anyway, so it shouldn't be a specific issue here.