GetFitHReg {ptest}R Documentation

Compute loglikelihood ratio test statistic

Description

The -2 loglikelihood ratio test statistic, -2LLR, is computed for testing for periodicity.

Usage

GetFitHReg(y, t = 1:length(y))

Arguments

t

Vector of corresponding time points.

z

Vector containing the series.

Details

To compute the likelihood ratio statistic, a harmonic regression model is fitted by the maximum likelihood estimations (MLE) according to the selected model. In particular, the frequency f is found by the grid search among En = {j/101 | j=1,…,50 and j/101 ≥ 1/n}. The MLE is equivalent to the least square estimation.

Value

Vector of length 2 containing -2 loglikelihood ratio test statistic and the estimated frequency.

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.


[Package ptest version 1.0-8 Index]