These special functions provide interfaces to more complicated functions within the model formulae interface.

common_xregs

Specials

trend

The trend special includes common linear trend regressors in the model. It also supports piecewise linear trend via the knots argument. For irregular time series, the trend is proportional to elapsed time, measured in the units of the time index (e.g. days for Date, seconds for POSIXct).


trend(knots = NULL, origin = NULL)
knotsA vector of times (same class as the data's time index) identifying the position of knots for a piecewise linear trend.
originAn optional time value (same class as the data's time index) to act as the starting time for the trend.

season

The season special includes seasonal dummy variables in the model.


season(period = NULL)
periodThe periodic nature of the seasonality. This can be either a number indicating the number of observations in each seasonal period, or text to indicate the duration of the seasonal window (for example, annual seasonality would be "1 year").

fourier

The fourier special includes seasonal fourier terms in the model. The maximum order of the fourier terms must be specified using K.


fourier(period = NULL, K, origin = NULL)
periodThe periodic nature of the seasonality. This can be either a number indicating the number of observations in each seasonal period, or text to indicate the duration of the seasonal window (for example, annual seasonality would be "1 year").
KThe maximum order of the fourier terms.
origin[Deprecated] This argument had no effect and is ignored. Fourier terms are anchored to the time index's epoch.