Learn R Programming

uroot (version 1.4-1)

CH.test: Canova-Hansen Test

Description

This function computes the Canova-Hansen statistic for testing the null hypothesis of stationary seasonal cycles against the alternative of seasonal unit roots.

Usage

CH.test (wts, frec=NULL, f0=1, DetTr=FALSE, ltrunc=NULL)

Arguments

wts
a univariate time series object.
frec
a vector indicating the cycles to analyse. By default, all seasonal cycles are tested.
f0
a 0-1 (No-Yes) vector of length one indicating wether a first lag of the dependent variable is included or not in the auxiliar regression. See details.
DetTr
a logical argument. If TRUE a linear trend is included in the auxiliar regression.
ltrunc
lag truncation parameter for computing the residuals covariance matrix. By default, $round(s*(N/100)^0.25)$, where eqn{s} is the periodicity of the data and $N$ the number of observations.

Value

Details

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.

References

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.

See Also

CH.rectest.

Examples

Run this code
## CH test
    data(AirPassengers)
    ## Test for stationary cycles at all seasonal frequencies,
    ## including a first order lag and but not a linear trend.
    ch.out1 <- CH.test(wts=AirPassengers, frec=c(1,1,1,1,1,1), f0=1, DetTr=FALSE)
    ch.out1
    ## Test for stationary seasonal cycles at frequencies +i and -i,
    ## including a first order lag and but not a linear trend.
    ch.out2 <- CH.test(wts=AirPassengers, frec=c(0,0,0,0,0,1), f0=1, DetTr=FALSE)
    ch.out2

Run the code above in your browser using DataLab