CH.test {uroot} | R Documentation |
This function computes the Canova-Hansen statistic for testing the null hypothesis of stationary seasonal cycles against the alternative of a unit root at either a single or a set of seasonal frequencies.
CH.test (label, frec, f0, DetTr, showcat)
label |
a list object with information about the series. The list consist of the following elements. vari , a ts object with the data of the series, s , the periodicity of the series (4, 12, or 1 for quarterly, monthly, or anual data), t0 , a vector of two elements indicating the year and season of the first observation, N , number of observations. |
frec |
a vector indicating the frequencies to analyse. |
f0 |
a 0-1 (No-Yes) vector of length one indicating wether a lag of the dependent variable is included or not in the auxiliar regression. |
DetTr |
a logical argument. If TRUE a linear trend is included in the auxiliar regression. |
showcat |
how the results are showed and stored. If TRUE a brief explanation reports the results. If FALSE a list object stores the results. |
Elements of frec
must be set equal to 0 if the season assigned to this element is not considered and equals to 1 for the frequencies to analyse. The position of each frequency in the vector is as follows: c(pi/2, pi) for quarterly series and c(pi/6, pi/3, pi/2, 2pi/3, 5pi/6, pi) for monthly series.
The lag truncation parameter for the covariance matrix is round(s*(N/100)^{0.25}), where s is the periodicity of the series and N the length of the series.
CH test statistic.
Javier López-de-Lacalle javlacalle@yahoo.es and Ignacio Díaz-Emparanza etpdihei@bs.ehu.es
F. Canova and B.E. Hansen (1995), Are seasonal patterns constant over time? A test for seasonal stability. Journal of Business and Economic Statistics, 13, 237-252.
## Analyse frequency pi, including a first order lag and but not a linear trend. data(AirPassengers) AirP <- list(vari=AirPassengers, s=12, t0=c(1949, 1), N=length(AirPassengers)) CH.test(label=AirP, frec=c(0,0,0,0,0,1), f0=1, DetTr=FALSE, showcat=TRUE)