Question

I ran a Variance Ratio test using the vrtest package (and the Lo.Mac command). My problem is that R just provides me with the computed test statistics and not with the frontier value of the test, the p values etc. Does someone know how to do this? Here is what I have done:

> Lo.Mac(rcorr,kvec)
$Stats
             M1         M2
k=2   2.2525920  2.1072370
k=5   0.8903658  0.8383312
k=10 -0.5530420 -0.5388423

> str(Lo.Mac(rcorr,kvec))
List of 1
 $ Stats: num [1:3, 1:2] 2.253 0.89 -0.553 2.107 0.838 ...
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr [1:3] "k=2" "k=5" "k=10"
  .. ..$ : chr [1:2] "M1" "M2"

Thank you very much !

Géraldine

Était-ce utile?

La solution

see ?Boot.test

This function returns bootstrap p-values of the Lo-MacKilay (1988) and Chow-Denning (1993) tests.

Boot.test(rcorr,kvec,nboot=500,wild="Normal")
$Holding.Period
[1]  2  5 10

$LM.pval
[1] 0.012 0.284 0.810

$CD.pval
[1] 0.028

$CI
          2.5%    97.5%
k=2  -2.013676 1.733034
k=5  -1.725987 1.745693
k=10 -1.562838 1.815892
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top