On Sat, 17 May 2014, Riccardo (Jack) Lucchetti wrote:
"Serisously" perhaps is too strong a word here. What we
mean is that we are
not aware of an algorithm which will give you exact p-values for the KPSS
test, so we rely on linear interpolation, banking on the fact that the
p-value function is monotone by definition. Certainly, the p-value for
0.403951 is between 10% and 5%, and I would be very surprised if it turned
out to be very different from 8%.
In fact, it turns out to be approximately 7%: here we use 1024 to
approximate infinity, but of course if you really care you can tailor the
example to your needs:
<hansl>
set echo off
set messages off
nulldata 1024
bench = 0.403951
repli = 160000
l = 3
R = 0
loop repli --quiet
x = normal()
kpss l x --quiet
R += ($test > bench)
endloop
p = R/repli
se = sqrt(p*(1-p))
cb = 1.96 * se / sqrt(repli)
printf "pvalues for %g = %8.6f (+/- %5.3f)\n", \
bench, p, cb
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------