MATLAB: Using Simbiology to estimate parameters based on several variables/rules

SimBiologysimbiology parameter estimation

Currently I am trying to use Simbiology to model a few sets of data. The PBPK model that I am using has 5 compartments with 3-4 species in each compartment. I've figured out how to use the sbionlinfit function and I do not have problems when I estimate parameters based on 'fake' data for individual species in the PBPK model. However, the data that I will obtain experimentally will be a bulk measurement, so it will be the sum of the species in each compartment. I've tried making this a parameter that is defined as a repeated assignment (i.e. compartment_total = species1+species2+… where compartment_total is a parameter), but when I try fitting data using this the estimations are nonsensical. Is there a better way to define a parameter so that it is a function of several species in the model, or is this possible with simbiology?

Best Answer

  • Hi Corey,
    No, I think you're doing the right thing by using a repeated assignment rule to define the compartment total. What do you mean by "the estimations are nonsensical"?
    I'm guessing you're saying that the estimated parameter values are not physically reasonable. This can occur for a number of reasons, but it is usually a problem with the estimation rather than a problem with the SimBiology model itself. One thing on the model that occasionally helps is tightening the simulation tolerances, for example reducing the relative tolerance from the default of 1e-3 to something like 1e-6.
    Here are some things you can try to improve the estimation:
    • Try different initial values for the estimated parameters.
    • Set the options to display the results at each iteration to see how the estimation is proceeding and what might be going wrong. You can do this by setting options.Display = 'iter', where options is the struct of options that you pass to sbionlinfit.
    • If you are using the R2014a of MATLAB, you can try using sbiofit instead of sbionlinfit. This will let you use different MATLAB functions for the estimation, some of which may converge to a more reasonable result. For example, you can try fminsearch. If you have the Optimization Toolbox, you can also use fminunc. And if you have the Global Optimization Toolbox, you can use methods like genetic algorithms (ga), particle swarm optimization (pso), or pattern search (patternsearch).
    Good luck!