Forecasting using AR(p) model with real-time data. NEED HELP !!!!!

조회 수: 1 (최근 30일)
Panty
Panty 2014년 7월 14일
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개)

카테고리

Help CenterFile Exchange에서 Biological and Health Sciences에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by