Seasonality {greenbrown}R Documentation

Check a time series for seasonality

Description

This function checks a time series for seasonality using three different approaches:

Usage

Seasonality(Yt, return.freq = FALSE, plot = FALSE, ...)

Arguments

Yt

univariate time series of class ts.

return.freq

if return.freq is TRUE the function returns the frequency at the maximum of the periodogram.

plot

plot periodogram and acf? (see spec.pgram and acf)

...

further arguments (currently not used)

Value

The function returns a boolean vector of length 3 including TRUE if a method detected seasonality or FALSE if a method did not detect seasonality.

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

See Also

spec.pgram, acf, lm, BIC

Examples

# load a time series of NDVI (normalized difference vegetation index)

# time series with strong Seasonality:
Yt <- SimTs(Srange = 0.2, Tslope=c(0.0004, 0))[,1]
plot(Yt)
Seasonality(Yt)

# time series with Seasonality and some noise
Yt <- SimTs(Srange = 0.1, Tslope=c(0.0004, 0), Rsd=0.18, Rrange=0.25)[,1]
plot(Yt)
Seasonality(Yt)

# time series with Seasonality but many noise
Yt <- SimTs(Srange = 0.1, Tslope=c(0.0004, 0), Rsd=0.22, Rrange=0.4)[,1]
plot(Yt)
Seasonality(Yt)

# time series without Seasonality 
Yt <- SimTs(Srange = 0.01, Tslope=c(0.0004, 0), Rsd=0.2, Rrange=0.4)[,1]
plot(Yt)
Seasonality(Yt)

# plot results for each seasonality method
Yt <- SimTs(Srange = 0.1, Tslope=c(0.0004, 0), Rsd=0.18, Rrange=0.25)[,1]
Seasonality(Yt, plot=TRUE)



[Package greenbrown version 2.4.3 Index]