seasdummy {tsutils} | R Documentation |
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 |
y |
this is an optional time series input that can be used to get seasonal periodicity ( |
type |
type of seasonal dummies to create.
|
full |
If full is |
Value
An array with seasonal dummies, where rows correspond observations and columns to dummy variables.
Note
If the seasonal periodicity is fractional then the the type will be overriden to trigonometric and only two seasonal dummies with be produced. One cosine and one sine.
Author(s)
Nikolaos Kourentzes, nikolaos@kourentzes.com
Examples
seasdummy(24,12)