Forecasting using AR(p) model with real-time data. NEED HELP !!!!!
2 次查看(过去 30 天)
显示 更早的评论
Hi there !
I would like to share with you my problem. I want to forecast recursively the next 12 (unknown) observations. I have attached my real-time dataset which is in a triangular format. As you can see in my excel file, I want to forecast the next 12 (unknown) observations of each column. I am using an AR(8) model. Let me also give you the code I have developed.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[rows,columns]=size(NEW_ROUTPUTQvQ19652014FilledMissingValues);
for column=1:columns;
InSampleData=NEW_ROUTPUTQvQ19652014FilledMissingValues(1:end,column);
find(InSampleData==0);
data=InSampleData(1:(ans-1),1);
for periods_ahead = 1:12;
Mdl = arima(1,0,0);
EstMdl = estimate(Mdl,data);
[Yhat,YMSE] = forecast(EstMdl,1);
data(end+1,1)= Yhat;
zeros=find(NEW_ROUTPUTQvQ19652014FilledMissingValues==0);
pos=zeros(1,1);
NEW_ROUTPUTQvQ19652014FilledMissingValues(pos,column)=Yhat;
end;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If something is not clear or you have questions I am happy to answer you asap.
Could you please help me with it..??? Think I am desperate.!!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biological and Health Sciences 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!