Autoregressive model using Yule-Walker method

조회 수: 10 (최근 30일)
Artyom
Artyom 2012년 7월 26일
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