
Mutli-compartment fit with numeric wegihts
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a simbiology PBPK model, to which I successfully fit several organ data (liver, kidneys, spleen, blood, ...) simulatenously using the proportional error model. I would like now to switch to numeric weights (1/SD²) for the error model to account for the experimental variability in the model, as I have concentrations and SDs data for each compartment/organ. My data is now formatted in a "wide" format: time points in rows, organ concentrations as columns.
I've done some tests on a two-compartment model (GI + Central), based on the example bioavailabilty.sbproj file to remove complexity and enable quick testing of the approach:
I managed to implement the numeric weights when fitting only one compartment, by adding a column SD (and even Weights) to the dataset (see files beginning with "fit1comp_").
However when fitting data of two compartments and keeping the wide format of the data, with then Conc_Central, Conc_GI, SD_Central and SD_GI columns, this approach doesn't seem to work because of the multi-column format of the Weights (see files beginning with "fit2comp_wide_").
I also tried to have data in a "long" format, with Time, Conc, SD and Group as columns, where the groups represent my compartment (central, GI). However when mapping the responses, I didn't manage to assign properly the Blood_Plasma.Drug_Central and GI_Compartment.Drug_Oral to the groups in the model analyzer application. The group-specific properties seem only to be variants and doses and not response. I understood from the documentation this groupping is mostly foreseen to map different individuals for the same type of response, so I am not sure how this can be implemented.
Do you have any advice on how to implement the mutli-compartment fit with numeric weights?
Thanks in advance!
Best regards
0 个评论
采纳的回答
Florian Augustin
2025-6-16
Hi Justine,
the weights must be a numeric matrix or a function handle. In the script you provided, the weights are specified as a table. Each column in the weight matrix corresponds to the weights of a specifc response. The first column specifies the weights for the first response, the second column specifies the weights for the second response, and so on.
In your script, fit2comp_wide_runprogram, you can specify the weights as follows:
f.Weights = [data.Weight_IV, data.Weight_Oral];
In the SimBiology Model Analyzer app, you can specify the the weights by specifying the names of the weight columns:

The weights in the data you shared contain NaN values, this is currenlty not supported (R2024a/R2025a). Please specify the weight 1 for any missing data (NaN values in measurement data). NaN data values for measurements are eventually ignored during fitting, the actual value of the weight you specify is not important, however, it must be non NaN.
I hope this helps.
Best,
Florian
0 个评论
更多回答(0 个)
社区
更多回答在 SimBiology Community
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scan Parameter Ranges 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!