specials: Special functions used in ssm formulas

Description Usage Arguments Details Author(s) See Also Examples

Description

Auxiliary function for modelling the time-dependent trend patterns when formulating ssm models.

Usage

1
2
3
4
polytrig(time, period = 365.25, degree = 1)
polytime(time, degree = 1)
sumseason(time, period = 12)
season(time, period = 12)

Arguments

time

a vector giving the observation times, eg. 1:n. The variable 'time' is by default set to time(y), where y is the response in the formula in the ssm call.

period

the period of the seasonal pattern.

degree

the degree of the trigonometric polynomial or the degree of the polynomial time trend.

Details

polytrig defines a trigonometric polynomial in time, polytime defines a polynomial time trend, sumseason produces a seasonal pattern in which the factors sum to zero over the period, and season defines a factor. The functions polytrig and season can be used outside the ssm call. However, polytime and sumseason are treated mainly inside the ssm call.

Author(s)

Claus Dethlefsen and Søren Lundbye-Christensen.

See Also

ssm, kfilter, smoother, getFamily.

Examples

1
2
polytrig(1:10,degree=2)
season(1:12,period=4)

ClausDethlefsen/sspir documentation built on May 6, 2019, 7 p.m.