Autoregressive model using Yule-Walker method

10 次查看(过去 30 天)
Hi everyone.
I'm trying to find autoregressive coefficients for the signal using Yule-Walker method and Levinson-Durbin recursions, and then compute power spectral density of the signal. I have found aryule function which can "estimate autoregressive model". But aryule function needs order of the AR model. And what if I don't know what order is better. How can I calculate order of convergence?

回答(1 个)

Wayne King
Wayne King 2012-7-26
编辑:Wayne King 2012-7-26
You have to specify the order. One thing you can do is to specify a high order and return the reflection coefficients. The negative of the reflection coefficients is the partial autocorrelation function. The partial autocorrelation function will decay to zero at what is essentially the optimal AR order.
For example, I create an AR(2) process, but fit an AR(15) model. Then I'll look at the partial autocorrelation function.
A = [1 1.5 0.75];
x = filter(1,A,randn(1000,1));
[arcoefs,E,K] = aryule(x,15);
pacf = -K;
lag = 1:15;
stem(lag,pacf)
You see that the PACF essentially decays to zero after lag 2. That shows that an AR(2) model would be the best.
If you want you can easily construct approximate 95% confidence intervals to help in determining when the PACF values are not significantly different from 0.
stem(lag,pacf,'markerfacecolor',[0 0 1]);
xlabel('Lag'); ylabel('Partial Autocorrelation');
set(gca,'xtick',1:1:15)
lconf = -1.96/sqrt(1000)*ones(length(lag),1);
uconf = 1.96/sqrt(1000)*ones(length(lag),1);
hold on;
line(lag,lconf,'color',[1 0 0]);
line(lag,uconf,'color',[1 0 0]);
  1 个评论
Artyom
Artyom 2012-7-27
Thanks for your answer. And if have some white noise signal. Can we write:
x = randn(1000,1);
n=100;
[arcoefs,E,K] = aryule(x,n);
pacf = -K;
lag = 1:n;
stem(lag,pacf)
And is it ok that PACF not decays to zero at all?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by