PeriodicityTest {ptest} | R Documentation |
Monte-Carlo testing for periodicity in short time series using likelihood-ratio statistic in a fitted harmonic regression or Fisher's g statistic. Both tests are implemented as Monte-Carlo tests and can use more frequency components than allowed by the regular FFT method. Both tests allow missing values in the input series.
PeriodicityTest(x, NSim = 10^4, Numf = 50, whichTest = c("g", "LR"), nullDis = c("n", "t", "b"), ...)
x |
series |
NSim |
number of Monte-Carlo iterations |
whichTest |
"g" for Fisher's g statistic or "LR" for likelihood-ratio statistic |
nullDis |
"n", "t", "b" corresponding to N(0,1) or t or bootstrap for generating samples from the null case |
Numf |
Number of frequency components to use |
... |
additional parameters, df and ncp, passed the rt |
The input series is simulated NSim times to obtain the Monte-Carlo test.
p-value.
A.I. McLeod
Islam, M.S. (2008). Peridocity, Change Detection and Prediction in Microarrays. Ph.D. Thesis, The University of Western Ontario.
z<-SimulateHReg(10, f=2.5/10, 1, 2) PeriodicityTest(z, Numf=50)