MATLAB: Is it possible to combine pooled and unpooled parameter fitting in SimBiology 4.3 (R2013a)

SimBiology

I have a dataset that combines data from multiple studies, where each study was conducted with a different drug agent. I want to simultaneously fit the entire dataset to a single SimBiology model, such that
(a) A subset of the estimated parameters are commonly estimated for all the drug groups (pooled fitting).
(b) The remaining parameters are estimated in a drug-dependent manner, i.e. one set of estimated values per drug-group (unpooled fitting).

Best Answer

In order to combine pooled and unpooled parameter fitting please follow the steps below:
1. Load your .sbproj file
2. Load your data
3. If you have several measurement repeats for each drug (e.g. several persons) create a vector specifying to which group a person belongs 
4. Create a vector with initial values for the parameters. For each unpooled parameter the number of entries in the vector must be the same as the number of groups. E.g. if you have 2 drugs, 3 pooled and 1 unpooled parameter the number of entries in the vector will be 3+2*1 = 5;
5. Create your regression function
5.1. For each repeat select the correct parameters out of the parameter list using your vector containing the information to which group a measurement repeat belongs to
5.2. Call SIMULATE to simulate the model for this parameter set
5.3. Create a matrix out of all simulation results
6. Perform your fitting, e.g. using NonLinearModel.fit
Please find an example attached.
An enhancement request has been forwarded to our development department to include this functionality directly in Simbiology Desktop.