- #1
verd
- 146
- 0
Hi.
So I'm trying to do prediction/forecasting with a simple time series in MATLAB. But I'm having a bit of trouble with the AR coefficients.
So as a baseline, I've been trying to follow the example on this website:
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/ar/
In the first example, for the 3rd order example, they provide coefficients that look like:
2.753231 -2.740306 0.985501
But when I use MATLAB to generate the AR coefficients, using aryule or arburg, I get something completely different:
1.0000 -1.8242 0.9365
So when I loop something like:
x(t)=a(1)*x(t-1)+a(2)*x(t-2)+a(3)*x(t-3)
with the AR coefficients given to me at the above URL, I get a good prediction of the signal. But when I use MATLAB's coefficients (provided both from aryule and arburg) I get something that's not even close to the original signal.
So I was just wondering what I'm doing wrong? Am I using aryule/arburg incorrectly?
So I'm trying to do prediction/forecasting with a simple time series in MATLAB. But I'm having a bit of trouble with the AR coefficients.
So as a baseline, I've been trying to follow the example on this website:
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/ar/
In the first example, for the 3rd order example, they provide coefficients that look like:
2.753231 -2.740306 0.985501
But when I use MATLAB to generate the AR coefficients, using aryule or arburg, I get something completely different:
1.0000 -1.8242 0.9365
So when I loop something like:
x(t)=a(1)*x(t-1)+a(2)*x(t-2)+a(3)*x(t-3)
with the AR coefficients given to me at the above URL, I get a good prediction of the signal. But when I use MATLAB's coefficients (provided both from aryule and arburg) I get something that's not even close to the original signal.
So I was just wondering what I'm doing wrong? Am I using aryule/arburg incorrectly?
Last edited by a moderator: