LmSeasonalCycle: Calculate the mean seasonal cycle of a time series based on a...

Description Usage Arguments Value Author(s) See Also Examples

Description

The function calculates the mean seasonal cycle of a time series based on a linear regression between the values and the time. Therefore a linear model with interactions is fitted to the original values Y of the form: Y = (a * m) * (b * sin(m)) * (c * cos(m)) + d where m are the the seasonal indices (e.g. months).

Usage

1

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@tu-dresden.de> [aut, cre]

See Also

Decompose, TrendSeasonalAdjusted, MeanSeasonalCycle

Examples

1
2
3
4
5
6
ndvi.lmcycl <- LmSeasonalCycle(ndvi)
plot(ndvi.lmcycl)

ndvi.meancycl <- MeanSeasonalCycle(ndvi)
plot(ndvi.lmcycl[1:12], col="red", type="l")
lines(ndvi.meancycl[1:12], col="blue")

greenbrown documentation built on Dec. 18, 2020, 3:02 p.m.