Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Predicting ARMA model: where does the delay come from?
Replies: 3   Last Post: Nov 9, 2011 7:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tikkuhirvi Tietavainen

Posts: 94
Registered: 4/22/08
Predicting ARMA model: where does the delay come from?
Posted: Nov 4, 2011 7:00 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello all!

I am trying to model my time series with ARMA model and then predict the signal with 'predict'. Here's an example:

close all;clear all;clc;
k=25;%prediction step
mAR=10;%AR order
mMA=10;%MA order

%First signal:
y=smooth(rand(1500,1),100);
y=y(250:end-251);
y=y-mean(y);
data=iddata(y,[],0.01);
m=armax(data,[mAR,mMA]);
yp=predict(m,data,k);
figure;plot(y);hold on;plot(yp.OutputData,'r')

%Second signal:
y=sin(1:0.01:10)';
data=iddata(y,[],0.01);
m=armax(data,[mAR,mMA]);
yp=predict(m,data,k);
figure;plot(y);hold on;plot(yp.OutputData,'r')

The prediction signal (yp.OutputData) seems to have no delay with the second signal (sine wave), but compared to the first signal it is delayed about the prediction step. The signals I use look more like the first one, so this certainly will affect my prediction error, something like sqrt(sum((data.OutputData-yp.OutputData).^2)).

Where does this delay come from and how can I get rid of it? Why does it only affect the first signal?

Thank you,
Aino



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.