moving.estimation -- estimate locally optimized trend and season figures
moving.estimation(t.vec, y.vec, p, q.vec, m, base.period, lambda1, lambda2)A dataframe with the following components:
dataoriginal data y.vec
trendvector of estimated trend of length length(y.vec)
seasonvector of estimated season of length length(y.vec)
vector of points in time as integers
vector of data
maximum exponent in polynomial for trend
vector containing frequencies to use for seasonal component, given as integers, i.e. c(1, 3, 5) for 1/2pi, 3/2pi, 5/2*pi (times length of base period)
width of moving window
base period in number of observations, i.e. 12 for monthly data with yearly oscillations
penalty weight for smoothness of trend
penalty weight for smoothness of seasonal component