Learn R Programming

tsutils (version 0.9.4)

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))

Value

An array with seasonal dummies, where rows correspond observations and columns to dummy variables.

Arguments

n

number of observations to create.

m

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

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.

  • "bin}: binary dummies. \item \code{"trg: trigonometric dummies. See notes.

full

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

Author

Nikolaos Kourentzes, nikolaos@kourentzes.com

Examples

Run this code
seasdummy(24,12)

Run the code above in your browser using DataLab