MeanSeasonalCycle {greenbrown}R Documentation

Calculate the mean seasonal cycle of a time series

Description

The function calculates the mean seasonal cycle of a time series.

Usage

MeanSeasonalCycle(ts)

Arguments

ts

univariate time series of class ts

Value

Mean seasonal cycle of time series ts with the same length as ts, i.e. the mean seasonal cycle is repeated for each year. The mean seasonal cycle is centered to 0.

Author(s)

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

See Also

Decompose, TrendSeasonalAdjusted

Examples

# load a time series of Normalized Difference Vegetation Index
data(ndvi)
plot(ndvi)
ndvi.cycle <- MeanSeasonalCycle(ndvi)
plot(ndvi.cycle)

# the mean seasonal cycle is centered to 0, 
# add the mean of the time series if you want to overlay it with the original data:
plot(ndvi)
lines(ndvi.cycle + mean(ndvi, na.rm=TRUE), col="blue")

[Package greenbrown version 2.4.3 Index]