Simulate model program predictions are different from fitted curve
Show older comments
Hi,
I built a PBPK model and fitted a few parameters to the model by using observed data. Next I created a variant of the fitted parameters and simulated the model with the variant values. Based on my previous experience, I expect to see same predcition profile as then fitted plot when using the same model, but the predcitions from "Simulate Model" program are different.
On the other hand when I add sensitivity calculation in the "Simulate model" program, then the predicted curve obtained matches with the fitted curve. I am not sure of this behavior of the model in Simbiology.
May I get some help on figuring out this issue?
Thank you in advance
4 Comments
Rick Paxson
on 4 Mar 2024
Hello,
That does seem surprising. Here is what MIGHT be going on.
There is a feature (on by default) that automatically scales the absoluteTolerance on the ODE solvers in SimBiology.
That feature in combination with the fact that during fitting the following methods: fmincon, fminunc, lsqnonlin, lsqcurvefit, and scattersearch turn sensitivity analysis ON by default in order to compute gradients of the objective function, could be leading to having a different absolute tolerances between fitting and simulation.
If you indeed used one of the fitting methods mentioned above then you could test my hypothesis by turning off AbsoluteToleranceScaling. This can be done from the MATLAB command line (assuming m is the model):
>> cs = m.getconfigset;
>> cs.SolverOptions.AbsoluteToleranceScaling = false;
If you do this and refit the model (hopefully that is not too time consuming) then you can verify if the simulation gives you the same values.
Note that without AbsoluteToleranceScaling on you might have to adjust the absoluteTolerance by hand.
Let me know if this helps.
Bhargavi Srija Ramisetty
on 4 Mar 2024
Rick Paxson
on 5 Mar 2024
Edited: Rick Paxson
on 5 Mar 2024
Hi - so, can you confirm that you did the parameter estimation using one of those methods? And if so, did you set AbsoluteToleranceScaling to false for the fitting and then also for the simulation?
if so then I need to think more about this. In that case can you share the data and the project you are using?
Bhargavi Srija Ramisetty
on 11 Apr 2024
Answers (0)
Communities
More Answers in the SimBiology Community
Categories
Find more on Import Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!