Learn R Programming

nnfor (version 0.9.2)

seasdummy: Create seasonal dummy variables.

Description

Create binary or trigonometric seasonal dummies.

Usage

seasdummy(n, m = NULL, y = NULL, type = c("bin", "trg"), full = c(FALSE,
  TRUE))

Arguments

n

Number of observations to create.

m

Seasonal periodicity. If NULL it will take the information from the provided time series (y argument).

y

This is an optional time series input that can be used to get seasonal periodicity (m) and the start point.

type

Type of seasonal dummies to create. Can be "bin" for binary and "trg" for trigonometric.

full

If full is TRUE then keeps the m-th dummy that is co-linear to the rest.

Value

x - Array with seasonal dummies.

Examples

Run this code
# NOT RUN {
  x <- seasdummy(24,12)

# }

Run the code above in your browser using DataLab