getds: get deseasonalized time series

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This is a utility function. Most users should use the ds.

Usage

1
getds(z, s, Fm = 6, Fs = 6, ic = c("BIC", "AIC"), lag.max = 20, standardizeQ=TRUE)

Arguments

z

original series

s

seasonal period either s=12 or s=365.25

Fm

Number of Fourier components for seasonal mean. If Fm=0, then only the overall mean of series is used.

Fs

Number of harmonics for seasonal standard deviations.If Fs=0, only overall standard deviation is used.

ic

"BIC" or "AIC"

lag.max

Number of lags used to fit AR

standardizeQ

If TRUE, divide by seasonal standard deviation. Otherwise, only use seasonal mean correction.

Details

The series is deseasonalized by subtracting the seasonal means and dividing by the seasonal standard deviations. If Fm=0, the overall mean is used and if Fs=0, the overall standard deviation is used. If standardizeQ is FALSE, the series is not divided by the standard deviation and only the mean or seasonal mean correction is done. In addition, the best AR model is determined for the deaseasonalized series according to the BIC or AIC criterion. This criterion may be used to select the best deseasonalization.

Value

list with two components: 'dspar' and 'z'. dspar: vector of length 4 containing Fm, Fs, p, IC-value. z: deseasonalized series

Author(s)

A. I. McLeod

References

K. W. Hipel and A. I. McLeod (1994). Time Series Modelling of Water Resources and Environmental Systems. Elsevier.

See Also

ds

Examples

1
2
z <- getds(log(Saugeen), s=12, Fm = 5, Fs = 4, ic = "AIC", lag.max = 20)$z
acf(z)

Example output

Loading required package: lattice
Loading required package: FitAR
Loading required package: leaps
Loading required package: ltsa
Loading required package: bestglm

deseasonalize documentation built on May 2, 2019, 3:39 p.m.