Learn R Programming

pRSR (version 3.1.1)

pvalrsr: Finds pvalue for testing periodicity using RSR.

Description

It finds pvalue for tesing periodicity for any series using RSR.

Usage

pvalrsr(x, t=1:length(x), nf=150, Numpq = 11)

Arguments

x
series to be tested for periodicity
t
vector of corresponding time points
nf
number of frequencies to enumerate
Numpq
Numebr of indices for interpolation in RSR

Value

pvalue

Details

A full RSR is integral part of the package. This was done using likelihood ratio statistic for simulated series from white noise process. For more information about the procedure, please see the first reference.

References

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

MacKinnon, J. G. (2001). Computing numerical distribution functions in econometrics. In proceedings of High Performance Computing Systems and Applications, edited by Pollard, A., Mewhort, D. J. and Weaver, D. F. Springer US. Vol. 451, 455-471.

Examples

Run this code
# Non-Fourier frequency
z<-SimulateHReg(20, f=2.5/20, 1, 2)
pvalrsr(z)  # finding p-value using RSR

# For comparing with Fisher's g test
# library(GeneCycle)
# fisher.g.test(z) # Fisher's g test


# Fourier frequency
y<-SimulateHReg(20, f=2/20, 1, 2)
pvalrsr(y)  # finding p-value using RSR
# For comparing with Fisher's g test
# library(GeneCycle)
# fisher.g.test(z) # Fisher's g test

Run the code above in your browser using DataLab