Constant parameter setting throws error, or... if I don't set a parameter to constant, but don't change it, does it stay constant?
7 次查看(过去 30 天)
显示 更早的评论
In another thread, I asked about using subject- (group- in SimBiology) dependent parameter values to allow fitting of one part of a model (say, PD), using subject-specific PK parameters.
It turns out you can. I'm doing this this way:
In my input data file, I duplicate my subject number column and call it "Group". In my model, I've added a species called "Group". I've created a dose object that takes the Group value in that extra column and doses the Group species with that value. So during the fit of any subject, the value in Group is that subject's ID number. I've created a setparvalue.m function that accepts a parameter name and the Group number as inputs. In the code, it reads subject numbers, parameter names, and parameter values from a spreadsheet. These three things are all labeled as persistent so that the time-consuming physical read is done only once.
For each parameter, I have a repeat assignment rule
kmAB_12 = setparvalue('kmAB_12',Group)Gr
For subject-specific operation, this rule is set to active and the parameter value constant flag is set to zero. That is, the parameter is used as a variable.
For normal operation, this rule set to inactive and the parameter value constant flag is set to 1 (that is, the parameter is constant).
The inactive rule generates a little red icon showing that it's inactive. That is as expected and is fine. But even when the rule is inactive, an error icon is generated due to the fact that the rule is modifying a constant parameter.
If the following makes sense, I have a suggestion and a question.
Suggestion: Given that an inactive rule does not affect simulation, I would suggest that any error generated should be suppressed when a rule is inactive.
Question: If I leave the parameter variable all the time, but nothing in the model changes that parameter, does the parameter remain constant? That is, could I just set the parameter constant flag to zero and leave it, to suppress errors? Can you fit parameters that aren't set to constant? I don't observe parameter values changing but I was wondering if it could change under any SimBiology scenario.
0 个评论
采纳的回答
Arthur Goldsipe
2019-11-13
Great feedback as always, Jim.
As for your immediate questions:
"If I leave the parameter variable all the time, but nothing in the model changes that parameter, does the parameter remain constant? That is, could I just set the parameter constant flag to zero and leave it, to suppress errors?"
Yes, you can use this approach so that you have the flexibility of changing the parameter under other scenarios. That's exactly what I would do in the situation you describe.
"Can you fit parameters that aren't set to constant? I don't observe parameter values changing but I was wondering if it could change under any SimBiology scenario."
Yes, when you try to estimate a parameter that is not constant, what you are really estimating is the initial value of that parameter (before application of any rules and doses at time = 0). One annoying thing right now is that SimBiology still allows you to try to estimate this initial value of a parameter that is modified by a repeated assignment or initial assignment rule, even though that doesn't really make sense. It's on my list of issues to improve with our fitting capabilities.
3 个评论
Arthur Goldsipe
2019-11-13
Right, you should be ok estimating a parameter that is set to Constant=false, as long as the parameter isn't modified by a rule.
And if I understand correctly, you can do a naive pooled fit with dosing. There's a pooled option for sbiofiot (and fitting programs in the SimBiology Analysis app). You still set up the data and dosing the same way you wook for an unpooled fit. So you still using different dosing for each individual, but you only estimate a single set of parameters that are the same across all individuals. If you need more details on how to do it, let me know (and whether you want details on the command line or GUI approach, or both).
更多回答(0 个)
另请参阅
类别
在 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!