sincos function

Trigonometric variables

Trigonometric variables

sincos creates an full set of trigonometric variables.

sincos(Y, n.ahead = 0, constant = FALSE)

Arguments

  • Y: an object of class ts used to determine the sample period and frequency.
  • n.ahead: number of additional observations to extend the sample period.
  • constant: logical indicator to include a column of ones.

Returns

A matrix of trigonometric variables.

Examples

Y <- AirPassengers P58 <- sincos(Y)