约翰森在协整方面有一个测试结果。
> library("urca")
> summary(ca.jo(data.frame(price.fut.ms, price.spot.ms), type="trace", K=2, ecdet="none",
spec="longrun"))
######################
# Johansen-Procedure #
######################
Test type: trace statistic , with linear trend
Eigenvalues (lambda):
[1] 0.19914009 0.01814878
Values of teststatistic and critical values of test:
test 10pct 5pct 1pct
r <= 1 | 4.36 6.50 8.18 11.65
r = 0 | 57.21 15.66 17.95 23.52
Eigenvectors, normalised to first column:
(These are the cointegration relations)
price.fut.ms.l2 price.spot.ms.l2
price.fut.ms.l2 1.000000 1.000000
price.spot.ms.l2 -1.008907 0.443137
Weights W:
(This is the loading matrix)
price.fut.ms.l2 price.spot.ms.l2
price.fut.ms.d -0.2588310 -0.02235570
price.spot.ms.d 0.2902789 -0.02219381
如何从测试结果中提取-1.008907。在函数 ca.jo 的描述中,没有具体说明这个问题
答案 0 :(得分:1)
这是一个S4对象,因此我们需要使用@
summary(ca.jo(data.frame(price.fut.ms, price.spot.ms),
type="trace", K=2, ecdet="none", spec="longrun")@V[2, 1]
使用可重现的例子
summary(sjd.vecm)@V[2, 1]
#[1] -0.9756549
data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, type="trace", K=2, ecdet = "none",
spec="longrun")