I get back to you about a VAR estimation pb with OLS.
Indeed, i'm working on the book "
", RUEY S.TSAY. You find the data file attachedMultivariate time series analysis with R and financial applications
I compute with RATS the example 2.3 P51/52. My program below is correct but my output gives me different constant than in the book, all the other results are correct, meaning coefficients ...
Here is the input program:
Code: Select all
OPEN DATA "C:\Users\amaraouinabih\Desktop\DATA SET TSAY\data-ch2\Users\rst\Documents\backup\mts\y2012\data\ch2\q-gdp-ukcaus.txt"
CALENDAR(Q) 1980:1
DATA(FORMAT=PRN,ORG=COLUMNS) 1980:01 2011:02 year mon uk ca us
set ldruk = (uk-uk{1})/uk{1}
set ldrca = (ca-ca{1})/ca{1}
set ldrus = (us-us{1})/us{1}
system(model=gthrate)
variables ldruk ldrca ldrus
lags 1 to 2
det constant
end(system)
estimate * 2011:02
Here is the output:
Code: Select all
VAR/System - Estimation by Least Squares
Quarterly Data From 1980:04 To 2011:02
Usable Observations 123
Dependent Variable LDRUK
Mean of Dependent Variable 0.0055077578
Std Error of Dependent Variable 0.0068001554
Standard Error of Estimate 0.0054848505
Sum of Squared Residuals 0.0034896958
Durbin-Watson Statistic 1.8946
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. LDRUK{1} 0.3891385477 0.0933074949 4.17050 0.00005891
2. LDRUK{2} 0.0592088748 0.0922941485 0.64152 0.52244814
3. LDRCA{1} 0.1042348787 0.0980531913 1.06304 0.28996991
4. LDRCA{2} 0.1100173826 0.0874112609 1.25862 0.21069556
5. LDRUS{1} 0.0496650442 0.0909433737 0.54611 0.58603942
6. LDRUS{2} 0.0160367054 0.0936390920 0.17126 0.86431709
7. Constant 0.0012729021 0.0007307646 1.74188 0.08418067
F-Tests, Dependent Variable LDRUK
Variable F-Statistic Signif
*******************************************************
LDRUK 11.6846 0.0000238
LDRCA 1.6907 0.1889007
LDRUS 0.1606 0.8518172
Dependent Variable LDRCA
Mean of Dependent Variable 0.0063247871
Std Error of Dependent Variable 0.0078874370
Standard Error of Estimate 0.0055930661
Sum of Squared Residuals 0.0036287571
Durbin-Watson Statistic 1.9885
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. LDRUK{1} 0.353427157 0.095148444 3.71448 0.00031466
2. LDRUK{2} -0.191366271 0.094115104 -2.03332 0.04430231
3. LDRCA{1} 0.337800128 0.099987773 3.37841 0.00099330
4. LDRCA{2} -0.175898809 0.089135878 -1.97338 0.05083036
5. LDRUS{1} 0.468266369 0.092737679 5.04936 0.00000166
6. LDRUS{2} -0.008218691 0.095486584 -0.08607 0.93155782
7. Constant 0.001244399 0.000745183 1.66993 0.09763055
F-Tests, Dependent Variable LDRCA
Variable F-Statistic Signif
*******************************************************
LDRUK 7.1081 0.0012246
LDRCA 6.5873 0.0019512
LDRUS 12.7843 0.0000096
Dependent Variable LDRUS
Mean of Dependent Variable 0.0068137660
Std Error of Dependent Variable 0.0075244061
Standard Error of Estimate 0.0061743114
Sum of Squared Residuals 0.0044221661
Durbin-Watson Statistic 1.9983
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. LDRUK{1} 0.490392967 0.105036506 4.66879 0.00000820
2. LDRUK{2} -0.311590781 0.103895779 -2.99907 0.00331447
3. LDRCA{1} 0.239895061 0.110378750 2.17338 0.03178423
4. LDRCA{2} -0.131775390 0.098399099 -1.33919 0.18312603
5. LDRUS{1} 0.234867612 0.102375208 2.29418 0.02357932
6. LDRUS{2} 0.087377617 0.105409786 0.82893 0.40884492
7. Constant 0.002913876 0.000822624 3.54217 0.00057263
F-Tests, Dependent Variable LDRUS
Variable F-Statistic Signif
*******************************************************
LDRUK 11.7362 0.0000228
LDRCA 2.7894 0.0655852
LDRUS 2.9101 0.0584565
In the book the constants are : 0.1258 0.1231 0.2895
So why there is this decimal pb difference?
Thanks for your explanations.
Best regards.
Nabih