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

1 vue (au cours des 30 derniers jours)
Panty
Panty le 14 Juil 2014
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.!!

Réponses (0)

Catégories

En savoir plus sur Biological and Health Sciences dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by