Effacer les filtres
Effacer les filtres

How to simulate ARX process with AR errors

3 vues (au cours des 30 derniers jours)
ABDULAZIZ ALTUN
ABDULAZIZ ALTUN le 2 Mai 2020
I am trying to simulate the following model
where and
But was not helpful, can you help? Thank you

Réponse acceptée

ABDULAZIZ ALTUN
ABDULAZIZ ALTUN le 3 Mai 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)

Plus de réponses (0)

Catégories

En savoir plus sur Conditional Mean Models dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by