moment.test {OLCPM} | R Documentation |
test whether the k-th moment exists
Description
This function tests the existence of k-th moment by randomized method in Trapani (2016).
Usage
moment.test(x, k = 16, R = 400)
Arguments
x |
a numeric vector of data samples. |
k |
a number no smaller than 4, indicating that the procedure will test
the existence of the k-th moment when k is even. Otherwise, the procedure
will test the existence of the |
R |
the number of standard Gaussian variables generated in the randomized test; see more details in Trapani (2016). |
Details
The procedure is adapted from Trapani (2016) with \psi=2
, where
\psi
is a tuning parameter to scale the sample moments defined
in Section 3.1 of Trapani (2016). For simplicity, we only test the 4th, 6th,
... 2c-th moments.
Value
a scalar in [0,1]
, indicating the p-value
of the test. The null hypothese is that the k-th moment doesn't exist.
Therefore, a small p-value indicates the existense of the k-th moment.
Author(s)
Yong He, Xinbing Kong, Lorenzo Trapani, Long Yu
References
Trapani, L. (2016). Testing for (in) finite moments. Journal of Econometrics, 191(1), 57-68.
Examples
x=rt(10000,5)
moment.test(x,4)
x=rt(10000,4)
moment.test(x,4)