FisherGTest {ptest} | R Documentation |
Calculates p-value using Fisher's g-test for a single frequency
FisherGTest(z, UseC = TRUE, plot = FALSE)
z |
input series, no missing values |
UseC |
UseC=TRUE, use compiled code |
plot |
plot=FALSE, no plot. Use plot=TRUE for plot. |
An object 'hclass' is returned. The components in this object are structure(list(statistic = STATISTIC, parameter = PARAMETER, p.value = PVAL, method = METHOD, data.name = DNAME), class = "htest")
A.I. McLeod
Fisher, R.A. (1929). Tests of significance in harmonic analysis. Proc. Roy. Soc. A, 125, 54-59.
#Fourier Frequency n<-15 z<-SimulateHReg(50, f=2/n, 1, 2) FisherGTest(z) #non-Fourier Frequency z<-SimulateHReg(50, f=2.5/n, 1, 2) FisherGTest(z) #Compare R-code version with C-code version FisherGTest(z, UseC=FALSE)