pcTest-methods: Test for periodicity

pcTest-methodsR Documentation

Test for periodicity

Description

Test for periodicity

Usage

pcTest(x, nullmodel, nseasons, ...)

Arguments

x

the object to be tested, e.g. a time series or a periodic acf

nullmodel

specification of the test to be performed

nseasons

number of seasons

...

additional arguments to be passed on to methods

Details

This is a generic function which acts as a dispatcher for various tests for periodicity and periodic correlation.

x is typically a time series but conceptually it is an object containing the statistics needed for carrying out the requested test. For example, x may be the periodic autocovariance function for tests based on sample autocorrelations and autocovariances.

The method with signature (x = "ANY", nullmodel = "character") may be considered as default for pcTest. The “real” default method simply prints an error message.

Value

a list containing the results of the requested test, see the individual methods for details

Methods

signature(x = "ANY", nullmodel = "character")

Argument nullmodel specifies the test to be performed. It should be a single character string. If it is one of the strings recognised by this method, the test specified below is carried out. Otherwise nullmodel is taken to be the name of a function which is called with arguments (x,...).

Currently, the following character strings are recognised:

"wn"

Box test for (non-periodic) white noise, simply calls Box.test.

"piar"

Franses (1996) test for periodic integration.

signature(x = "slMatrix", nullmodel = "character")

x here is the periodic autocovariance function. This method works similarly to the method for signature (x = "ANY", nullmodel = "character"), see its description.

Currently, the following character strings are recognised:

"pwn"

Ljung-Box test for periodic white noise,

"periodicity"

McLeod test for periodic correlation.

signature(x = "numeric", nullmodel = "character")
signature(x = "PeriodicTimeSeries", nullmodel = "character")

Note

TODO: critical values

Author(s)

Georgi N. Boshnakov

See Also

test_piar, pwn_McLeodLjungBox_test periodic_acf1_test

Examples

cu <- pcts(dataFranses1996[ , "CanadaUnemployment"])
cu <- window(cu, start = availStart(cu), end = availEnd(cu))

test_piar(cu, 4, 1, sintercept = TRUE)
pcTest(cu, "piar", 4, 1, sintercept = TRUE)

if(require(partsm)){
# same with LRurpar.test from partsm
LRurpar.test(cu, list(regular = c(0,0,0), seasonal = c(1,0), regvar = 0), p = 1)
}

GeoBosh/pcts documentation built on Dec. 8, 2023, 9:57 p.m.