Seasonal dummies
sdummies
creates an full set of seasonal dummies.
sdummies(Y, ref = 1, constant = FALSE, n.ahead = 0)
Y
: an object of class ts
used to determine the sample period and frequency.ref
: the reference season, positive integerconstant
: logical indicator to include a column of ones.n.ahead
: number of additional observations to extend the sample period.A matrix of trigonometric variables.
Y <- AirPassengers P58 <- sincos(Y)