Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the CanovaHansen statistic for testing the null hypothesis of stationary seasonal cycles against the alternative of seasonal unit roots.
1 2 
wts 
a univariate time series object. 
frec 
a vector indicating the cycles to analyse. By default, all seasonal cycles are tested. 
f0 
a 01 (NoYes) 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 s is the periodicity of the data and N the number of observations. 
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.
An object of class chstatclass
.
Javier LopezdeLacalle javlacalle@yahoo.es and Ignacio DiazEmparanza Ignacio.DiazEmparanza@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, 237252.
1 2 3 4 5 6 7 8 9 10 11  ## 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

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.