Autoregressive AR(2) Model Constraints/Parameters

5 ビュー (過去 30 日間)
Sam
Sam 2013 年 12 月 4 日
編集済み: Sam 2013 年 12 月 4 日
I need to plot a sample (of length 500) of an AR(2) process, with the following constraints.
Model: X_t=c+phi_1*X_t-1+...
Where X_0=X_1=0 and c=0, phi_1=3/2, phi_2=-3/4 and sigma^2=1/4
Do I use the arima function? How do I specify the constraints?

採用された回答

Sam
Sam 2013 年 12 月 4 日
編集済み: Sam 2013 年 12 月 4 日
Not to worry, the below works.
%%AR(2)
c = 0;
phi = [3/2, -3/4];
x(1)=0;
x(2)=0;
for t=3:n
x(t) = c + phi(1)*x(t-1) + phi(2)*x(t-2) + y(t);
end
plot(x, '-');
xlabel('t','fontsize',15);
ylabel('X(t)', 'fontsize', 15);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConditional Mean Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by