pcTest-methods | R Documentation |
Test for periodicity
pcTest(x, nullmodel, nseasons, ...)
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 |
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.
a list containing the results of the requested test, see the individual methods for details
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:
Box test for (non-periodic) white noise, simply calls Box.test
.
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:
Ljung-Box test for periodic white noise,
McLeod test for periodic correlation.
signature(x = "numeric", nullmodel = "character")
signature(x = "PeriodicTimeSeries", nullmodel = "character")
TODO: critical values
Georgi N. Boshnakov
test_piar
,
pwn_McLeodLjungBox_test
periodic_acf1_test
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.