PeriodicityTest {ptest}R Documentation

Monte-Carlo test a series for periodicity

Description

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.

Usage

PeriodicityTest(x, NSim = 10^4, Numf = 50, whichTest = c("g", "LR"), nullDis = c("n", "t", "b"), ...)

Arguments

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

Details

The input series is simulated NSim times to obtain the Monte-Carlo test.

Value

p-value.

Author(s)

A.I. McLeod

References

Islam, M.S. (2008). Peridocity, Change Detection and Prediction in Microarrays. Ph.D. Thesis, The University of Western Ontario.

See Also

FisherGTest

Examples

z<-SimulateHReg(10, f=2.5/10, 1, 2)
PeriodicityTest(z, Numf=50)


[Package ptest version 1.01 Index]