Fit data with weight in Simbiology

4 views (last 30 days)
Y.K.
Y.K. on 10 Dec 2020
Edited: Y.K. on 14 Dec 2020
Can simbiology run a “Fit_data” task to a data containing missing values in “Use weight for each response” mode?
I am trying to fit a model to a multi-dimensional time trajectory data with missing value using simbiology
The average value of each response differs so much that I use “Use weight for each response” option, otherwise model fitting to the just one trajectory with the highest average value occurs.
However, the fitting cannot be performed.
The reason might be the NaN value returned during the calculation of the “weight” because my data contains NaN value in the original time trajectory data.
Is my understanding correct?
Please let me know if there is a way to run simbiology “Fit_data” task to a data containing missing value(NaN) in “Use weight for each response” mode.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 10 Dec 2020
You can use NaN to indicate a missing value in your data. Such points will be ignored during fitting. If you are getting an error during fitting, I expect it is for a different reason. If you would like additional help figuring out the cause of the error, I suggest you share more details. The best option would be to share a SimBiology project file (.sbproj) that we can use to reproduce the error. At a minimum, please share more information about the exact error you are getting.
Also, you may be interested the "proportional" error model. This is equivalent to using a weight of 1 over the square of y sub i, where y sub i is the the value of the ith observation. You can read more about the various estimation options here.

More Answers (0)

Communities

More Answers in the  SimBiology Community

Community Treasure Hunt

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

Start Hunting!