Clear Filters
Clear Filters

VAR estimation in Matlab and STATA

2 views (last 30 days)
don
don on 8 Sep 2012
I am running VAR(2) model with two variables, say A and V, with some restrictions on the estimating matrix. Following is the code that I am running in Matlab.
if true
restriction = [1,0;1,1];
Spec = vgxset('n',2,'ARsolve',{logical(restriction),logical(restriction)});
Y = [ A, V ];
[EstSpec,EstStdErrors,LLF,W] = vgxvarx(Spec,Y,[],[],'CovarType','full');
end
The results in Matlab and STATA by comparison are
Model : 2-D VAR(2) with No Additive Constant
Conditional mean is AR-stable and is MA-invertible
Standard errors without DoF adjustment (maximum likelihood)
Parameter Matlab Value Stata Value
-------------- -------------- --------------
AR(1)(1,1) 1.03565 1.092692
(1,2) 0 -8.70e-17
(2,1) 0.126034 .0322713
(2,2) 1.30409 1.768418
AR(2)(1,1) -0.0622634 -.1178665
(1,2) 0 -4.37e-15
(2,1) -0.129925 -.0368959
(2,2) -0.322161 -.7805202
Q(1,1) 0.000275459 .00010679
Q(2,1) -0.000123201 -7.526e-06
Q(2,2) 9.06242e-005 8.522e-06
-------------- -------------- --------------
I am using MATLAB Version 7.11.0.584 (R2010b) with Econometrics Toolbox Version 1.4 and Stata 11.1 for Windows. Can anybody help me why they are different.

Answers (0)

Categories

Find more on Conditional Mean Models in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!