Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the Canova-Hansen statistic recursively along subsamples of the original data.
1 2 3 |
wts |
a univariate time series object. |
type |
a character string indicating how subsamples are selected. See details. |
nsub |
the number of observations in each subsample. |
frec |
a vector indicating the frequencies to analyse. |
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 s is the periodicity of the data and N the number of observations. |
trace |
a list object indicating if a trace of the iteration progress should be printed. Three
levels of information can be printed: |
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.
Rejection of the null hypothesis implies that the analysed cycles are non-stationary.
Three types of subsamples are considered: "backw", the statistic is computed for the last nsub
observations and then one year backwards is added until the beginning of the sample; "forw", the
statistic is computed for the first nsub
observations and then one year forwards is added until
the end of the sample; "moving", the statistic is computed over moving subsamples of length nsub
.
An object of class chrecst-class
.
Javier Lopez-de-Lacalle javlacalle@yahoo.es and Ignacio Diaz-Emparanza Ignacio.Diaz-Emparanza@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.
1 2 3 4 5 6 7 8 9 | ## 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.rectest(wts=AirPassengers, type="backw", nsub=48,
frec=c(1,1,1,1,1,1), f0=1, DetTr=FALSE)
show(ch.out1)
plot(ch.out1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.