Wrong toolbox is being called for simulate()
显示 更早的评论
I have a simple ARIMA model:
Mdl = regARIMA(minBIClags(v),0,0);
that is estimated for some variable v:
[EstMdl.v{v},~,~] = estimate(Mdl,y,'Display','off');
The class of the model is stored correctly:
class(EstMdl.v{v})
ans =
'regARIMA'
However, when I call the simulate() function:
sim_y = simulate(EstMdl.v{v}, num_observations, NumPaths=num_simulations, Y0=y, E0=innovations);
it uses the simulate() from the Risk Management Toolbox.
How can I ensure that the correct toolbox is used for this?
Thanks.
5 个评论
Harald
2025-10-10
Hi,
I am trying to reproduce this. Code I've used:
Mdl = regARIMA(1,0,0);
[v,~,~] = estimate(Mdl,(1:5)','Display','off');
%The class of the model is stored correctly:
class(v)
sim_y = simulate(v, 10, NumPaths=100, Y0=(1:5)', E0=rand(5,1));
This errors:
'Y0' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this function.
When setting a breakpoint in the sim_y = ... line and stepping in, MATLAB jumps into \toolbox\econ\econ\@regARIMA.
Can you try my reproduction example? If the behavior is as expected for my example but not for yours, please supply a reproducible example, i.e., include minBIClags and y.
Best wishes,
Harald
PK
2025-10-10
Harald
2025-10-10
Hi Pavel,
could you supply a reproducible example that demonstrates the unexpected use of simulate from Risk Management Toolbox?
Best wishes,
Harald
PK
2025-10-10
Hi Pavel,
The effect of dbstop if error should in this case be the same as setting the breakpoint and stepping in.
Desktop or online version should not make a difference.
The problem in this case is just that there is no Y0 parameter in regARIMA/simulate:
Again, we'd need to see reproducible code that ends up incorrectly calling simulate from the Risk Management Toolbox.
Best wishes,
Harald
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Biotech and Pharmaceutical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!