Ich mag würde den kritischen Wert von Test (und nur diese) Informationen nach dem Ausführen der ca.jo()
Funktion aus dem Modell Zusammenfassung in R.Extraktion von Informationen aus R Johansen Verfahren (ca.jo) Zusammenfassung
library(urca)
data(finland)
sjf <- finland
sjf.vecm <- ca.jo(sjf, ecdet = "none", type="eigen", K=2,
spec="longrun", season=4)
summary(sjf.vecm)
extrahieren Wie gezeigt, während summary()
eine lange Liste von Ergebnissen zurückgibt, bietet es nicht die Funktionalität, spezifischere Informationen durch die Verwendung von summary(sjf.vecm)$[target info]
zu erhalten.
######################
# Johansen-Procedure #
######################
Test type: maximal eigenvalue statistic (lambda max) , with linear trend
Eigenvalues (lambda):
[1] 0.30932660 0.22599561 0.07308056 0.02946699
Values of teststatistic and critical values of test:
test 10pct 5pct 1pct
r <= 3 | 3.11 6.50 8.18 11.65
r <= 2 | 7.89 12.91 14.90 19.19
r <= 1 | 26.64 18.90 21.07 25.75
r = 0 | 38.49 24.78 27.14 32.14
Eigenvectors, normalised to first column:
(These are the cointegration relations)
lrm1.l2 lny.l2 lnmr.l2 difp.l2
lrm1.l2 1.0000000 1.000000 1.0000000 1.000000
lny.l2 -0.9763252 -1.323191 -0.9199865 1.608739
lnmr.l2 -7.0910749 -2.016033 0.2691516 -1.375342
difp.l2 -7.0191097 22.740851 -1.8223931 -15.686927
Weights W:
(This is the loading matrix)
lrm1.l2 lny.l2 lnmr.l2 difp.l2
lrm1.d 0.033342108 -0.020280528 -0.129947614 -0.002561906
lny.d 0.022544782 -0.005717446 0.012949130 -0.006265406
lnmr.d 0.053505000 0.046876449 -0.007367715 0.002173242
difp.d 0.005554849 -0.017353903 0.014561151 0.001531004
Wie kann ich die Ergebnisse erhalten, nur aus dem kritischen Wert Tabelle, formatieren sie in irgendeiner Art und Weise und eine Tabelle erzeugen, die wie folgt aussieht:
Test | test | 10pct | 5pct | 1pct
----------------------------------------
r <= 3 | 3.11 | 6.50 | 8.18 | 11.65
r <= 2 | 7.89 | 12.91 | 14.90 | 19.19
r <= 1 | 26.64 | 18.90 | 21.07 | 25.75
r = 0 | 38.49 | 24.78 | 27.14 | 32.14
Ich fand die Lösung von dem von einem anderen Thread bereitgestellt hint (http://stackoverflow.com/questions/32639460/how-to-extract-value-from-one-s4-class). In diesem Fall funktioniert 'summary (sjf.vecm) @ cval'! –