Autoregressive AR(2) Model Constraints/Parameters

5 visualizaciones (últimos 30 días)
Sam
Sam el 4 de Dic. de 2013
Editada: Sam el 4 de Dic. de 2013
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?

Respuesta aceptada

Sam
Sam el 4 de Dic. de 2013
Editada: Sam el 4 de Dic. de 2013
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);

Más respuestas (0)

Categorías

Más información sobre Conditional Mean Models en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by