R语言程序如下:
jo1=ca.jo(data1,type="trace",ecdet = ('trend'),K=3,spec="longrun",season=NULL)
vecm.ols=cajorls(jo1,r=1)
summary(vecm.ols$rlm)
结果是这样的:
Response b.d :
Call:
lm(formula = b.d ~ ect1 + constant + b.dl1 + a.dl1 + b.dl2 +
a.dl2 - 1, data = data.mat)
Residuals:
Min 1Q Median 3Q Max
-0.147699 -0.012363 0.001038 0.015584 0.098315
Coefficients:
Estimate Std. Error t value Pr(>|t|)
ect1 0.0004875 0.0009597 0.508 0.612
constant -0.1299624 0.2585723 -0.503 0.616
b.dl1 0.0844789 0.0649283 1.301 0.194
a.dl1 -0.0039859 0.0236960 -0.168 0.867
b.dl2 0.0618550 0.0648104 0.954 0.341
a.dl2 0.0104587 0.0305578 0.342 0.732
Residual standard error: 0.033 on 236 degrees of freedom
Multiple R-squared: 0.01655, Adjusted R-squared: -0.008451
F-statistic: 0.662 on 6 and 236 DF, p-value: 0.6804
Response a.d :
Call:
lm(formula = a.d ~ ect1 + constant + b.dl1 + a.dl1 + b.dl2 +
a.dl2 - 1, data = data.mat)
Residuals:
Min 1Q Median 3Q Max
-1.24493 -0.01642 0.00068 0.02846 0.23329
Coefficients:
Estimate Std. Error t value Pr(>|t|)
ect1 -0.015848 0.002615 -6.062 5.30e-09 ***
constant 4.280570 0.704459 6.076 4.89e-09 ***
b.dl1 -0.044655 0.176892 -0.252 0.801
a.dl1 -0.844534 0.064558 -13.082 < 2e-16 ***
b.dl2 0.116768 0.176571 0.661 0.509
a.dl2 -0.695510 0.083252 -8.354 5.66e-15 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.0899 on 236 degrees of freedom
Multiple R-squared: 0.4225, Adjusted R-squared: 0.4078
F-statistic: 28.77 on 6 and 236 DF, p-value: < 2.2e-16
为什么误差修正模型的滞后项只有2阶而不是3阶呢,而且johansen检验的时候我的选的是带有趋势项的,为什么估计出的VECM模型里面是constant项呢