Pacy139
Newbie level 1
Hy everyone,
I am trying to predict time series with an AR Model using MATLAB. There are already functions provided that calculate the coefficients i.e ar(u,3); or armax(u[3,1]) and for predicting:
m1 = ar(u,3) % order 3
yp1 = predict(m1,data,10); %prediction horizon = 10
when plotting the predicted data i get a timedelay aprox. about the prediction horizon compared to the inputdata.
In the literature, however, i find plots with predictied data with large prediction horizon without any timedelay!!
Now i wonder if they just ploted the prediction for e.g. 30min at the time of calculation instead of 30min later (what i think makes no sense because why plotting a predicted value now and not at the time ahead in the future where i could compare ). They so get the same results as if i would shift my predicted signal to the left.
First i thought the delay is there because basically an AR model is a filter and there you should have a dalay - but with more and more figures shown in the literature that seem overcorrect I am not that sure anymore
Can anyone please explain to me the reason for the delay or what I am doing wrong and if so how the data should be plotted ??
Thankyou so much for your help
I am trying to predict time series with an AR Model using MATLAB. There are already functions provided that calculate the coefficients i.e ar(u,3); or armax(u[3,1]) and for predicting:
m1 = ar(u,3) % order 3
yp1 = predict(m1,data,10); %prediction horizon = 10
when plotting the predicted data i get a timedelay aprox. about the prediction horizon compared to the inputdata.
In the literature, however, i find plots with predictied data with large prediction horizon without any timedelay!!
Now i wonder if they just ploted the prediction for e.g. 30min at the time of calculation instead of 30min later (what i think makes no sense because why plotting a predicted value now and not at the time ahead in the future where i could compare ). They so get the same results as if i would shift my predicted signal to the left.
First i thought the delay is there because basically an AR model is a filter and there you should have a dalay - but with more and more figures shown in the literature that seem overcorrect I am not that sure anymore
Can anyone please explain to me the reason for the delay or what I am doing wrong and if so how the data should be plotted ??
Thankyou so much for your help