Simulate model program predictions are different from fitted curve

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

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.
Hi Ricardo,
Thank you for your answer. I tested your hypothesis by setting AbsoluteToleranceScaling to false, but it still shows the same result like before
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?
Hi
I used lsqnonlin method for parameter estimation and set the AbsoluteToleranceScaling to false for both fitting and simulation.
Please let me know how you want me to share the project file?
Thank you

Sign in to comment.

Answers (0)

Communities

More Answers in the  SimBiology Community

Products

Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!