How to simulate ARX process with AR errors

1 visualización (últimos 30 días)
ABDULAZIZ ALTUN
ABDULAZIZ ALTUN el 2 de Mayo de 2020
Respondida: ABDULAZIZ ALTUN el 3 de Mayo de 2020
I am trying to simulate the following model
where and
But was not helpful, can you help? Thank you

Respuesta aceptada

ABDULAZIZ ALTUN
ABDULAZIZ ALTUN el 3 de Mayo de 2020
The way I did it was by writing my own function.
%% ARX_AR_Error: function description
function [outputs] = ARX_AR_Error(c, S, beta, rho_Reg, rho_Error)
% c is the sample length
% S regressor variable
% rho_Reg the rho of the main regression
% rho_Error the rho of the error regression
M_1 =rho_Reg*diag(ones(c-1,1),-1);
M_2=zeros(c,1);
M_2(1,1)=rho_Reg;
ey_M_1=inv(eye(c)-M_1);
% Generate the AR error
MdlY = arima('AR',{rho_Error},'Constant',0,'Variance',1);
E = simulate(MdlY,c);
outputs=ey_M_1*(S*beta+E+M_2*randn(1));
Therefore, in simulating variables I simply wrote the following code
c=100;
s=randn(c,1);
rho_Reg=0.2;
rho_Error=0.3;
beta=0.5;
Y=ARX_AR_Error(c, s, beta, rho_Reg, rho_Error)
plot(Y)

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by