フィルターのクリア

ARMAX vs ARIMAX models: numerically different estimates

12 ビュー (過去 30 日間)
Stepp Gyogi
Stepp Gyogi 2020 年 6 月 19 日
コメント済み: Redho redho 2020 年 12 月 22 日
I am getting surprising results when using the "estimate" function from the arima class in Matlab. Although I have found resources regarding either ARIMAX or ARMAX models, I could not find anything mentioning the kind of discrepancies I am getting; I would expect and arima(1,1,1) fitted on a series Y to provide the same estimates as an arima(1,0,1) on the first-difference of the series (i.e. fitted on "diff(Y)"). Writing the equations for both models shows that both are equivalent when using a change of variable Yarmax = diff( Yarimax ).
However, below is some test code and results. As you can see, there are two aspects to these inconsistencies: 1. When starting with the simulated differenced series (ARMAX) and then compounding that series to create the ARIMAX series, there are slight differences which are bugging me (more for reproducibility than for estimation since the differences are small). These differences could be due to the fact the ARIMAX series needs to discard one more observation of X's, still I would appreciate being provided the correct parameters to provide to the Matlab functions in order to retrieve the same results. 2. When starting with the integrated series (ARIMAX) and then first-differencing it to estimate the ARMAX model, the ARIMAX estimation is "all over the place" in terms of its AR and MA components...
% parameters
cst = 0;
phi1 = 0.4;
theta1 = -0.95;
sigmaE2 = 1;
beta = [3 -2 5];
T = 1000;
X = rand(T, 3)+[0,10,2];
Y0 = 20;
E0 = 0;
% simulate and estimate ARMAX
mdlArmaxUnknown = arima( 1,0,1 );
mdlArmax = arima('AR',phi1,'D',0,'MA',theta1,'Constant',cst,'Beta',beta,'Variance',sigmaE2);
armaxMaxPQ = max( [ mdlArmaxUnknown.P, mdlArmaxUnknown.Q ] ) + 1;
rng(1); Yarmax = mdlArmax.simulate(T,'Y0',0,'X',X,'V0',sigmaE2,'E0',E0);
armaxEst = mdlArmaxUnknown.estimate( Yarmax( armaxMaxPQ:end ), 'Y0', 0, 'X', X, 'display', 'off' );
armaxSummary = armaxEst.summarize();
% take the simulated ARMAX model and compound it, then estimate it as
% an ARIMAX model
mdlArimaxUnknown = arima( 1,1,1 );
arimaxMaxPQ = max( [ mdlArimaxUnknown.P, mdlArimaxUnknown.Q ] ) + 1;
Yarimax = cumsum( [ Y0; Yarmax ] );
arimaxEst = mdlArimaxUnknown.estimate( Yarimax( arimaxMaxPQ:end ), 'Y0', Y0([1;1]), 'X', X, 'display', 'off' );
arimaxSummary = arimaxEst.summarize();
% compare ARMAX and ARIMAX
results = table( armaxSummary.Table.Value, arimaxSummary.Table.Value, 'RowNames', arimaxSummary.Table.Properties.RowNames, 'VariableNames', {'armax','arimax'} );
disp(results);
% Now do the reverse: start with ARIMAX series, differentiate to get
% ARMAX, and compare estimations
mdlArimax = arima('AR',phi1,'D',1,'MA',theta1,'Constant',cst,'Beta',beta,'Variance',sigmaE2);
rng(1); Yarimax = mdlArimax.simulate(T,'Y0',Y0([1;1]),'X',X,'V0',sigmaE2,'E0',E0);
arimaxEst = mdlArmaxUnknown.estimate( Yarimax( arimaxMaxPQ:end ), 'Y0', Y0([1;1]), 'X', X, 'display', 'off' );
arimaxSummary = arimaxEst.summarize();
%ARMAX
Yarmax = diff( Yarimax );
armaxEst = mdlArmaxUnknown.estimate( Yarmax( armaxMaxPQ:end ), 'Y0', 0, 'X', X, 'display', 'off' );
armaxSummary = armaxEst.summarize();
results = table( armaxSummary.Table.Value, arimaxSummary.Table.Value, 'RowNames', arimaxSummary.Table.Properties.RowNames, 'VariableNames', {'armax','arimax'} );
disp(results);
Decent but imperfect results for the first test:
armax arimax
________ ________
Constant -0.21152 0.10106
AR{1} 0.37322 0.35694
MA{1} -0.88944 -0.72669
Beta(1) 3.12 3.1908
Beta(2) -2.0455 -2.0918
Beta(3) 5.1264 5.1049
Variance 1.0618 1.3021
"Wild" results for the second test:
armax arimax
________ ________
Constant -0.22134 -4.3607
AR{1} 0.36867 0.99999
MA{1} -0.84813 -0.12774
Beta(1) 3.1323 3.2114
Beta(2) -2.0536 -2.0788
Beta(3) 5.1406 5.1568
Variance 1.1138 2.2961
The question therefore encompasses both these cases: I am looking for the correct use of parameters and Matlab function (i.e. those from the "econ" toolbox) which enable me to use whichever series first (differenced or integrated) and get correct and numerically equivalent estimations either way thereafter. Thank you!
  1 件のコメント
Redho  redho
Redho redho 2020 年 12 月 22 日
hi bro, could you help me with give this codes because i need this code to toward a bachelor degree
thanks before

サインインしてコメントする。

回答 (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