Error Using Estimate Function for ARIMA Class Models with Custom Options
2 次查看(过去 30 天)
显示 更早的评论
Hello all,
I am using Matlab 2013a to estimate an ARIMA model and forecast a time series 1 step. I have the following code, which works just fine (note the commented out pieces. We will get to those in a second):
model = arima(1,1,1);
model.Distribution = struct('Name','t','DoF',N-1);
arimaVariance = egarch(1,1);
arimaVariance.Distribution = struct('Name','t','DoF',N-1);
model.Variance = arimaVariance;
% arimaOptions = optimset('Display','off');
params = estimate(model,Y); %,'options',arimaOptions);
Now, if I remove the comments (and change nothing else) to form the following code:
model = arima(1,1,1);
model.Distribution = struct('Name','t','DoF',N-1);
arimaVariance = egarch(1,1);
arimaVariance.Distribution = struct('Name','t','DoF',N-1);
model.Variance = arimaVariance;
arimaOptions = optimset('Display','off');
params = estimate(model,Y,'options',arimaOptions);
I get this error:
"In an assignment A(I) = B, the number of elements in B and I must be the same."
Now, given that I only took comments off of a couple places and that the only option I altered was the Display option, it seems strange that this should alter the structure of the entire estimation algorithm.
If I remove the sections where I specify the distribution and variance functions, leaving the following code:
model = arima(1,1,1);
% arimaOptions = optimset('Display','off');
params = estimate(model,Y);%,'options',arimaOptions);
It works great again. If I uncomment those couple lines though to make this code:
model = arima(1,1,1);
arimaOptions = optimset('Display','off');
params = estimate(model,Y,'options',arimaOptions);
I get a different error:
"Index exceeds matrix dimensions."
And insight on why this could be?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Conditional Mean Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!