
CH.rectest (wts, type="moving", nsub=48, frec=NULL, f0=1, DetTr=FALSE, ltrunc=NULL, trace=list(remain=1,
plot=0, elaps=1))
remain
, the percentage of the whole procedure that has
been completed; plot
, a plot of the cchrecst-class
.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
.
CH.test
.## 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)
Run the code above in your browser using DataLab