How to simulate ARX process with AR errors

2 次查看(过去 30 天)
I am trying to simulate the following model
where and
But was not helpful, can you help? Thank you

采纳的回答

ABDULAZIZ ALTUN
ABDULAZIZ ALTUN 2020-5-3
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Conditional Mean Models 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by