periodicdummies {gets} | R Documentation |
Make matrix of periodicity (e.g. seasonal) dummies
Description
Auxiliary function that creates periodicity dummies (e.g. seasonal dummies) for regular time series. The function is similar to, but more general than, the seasonaldummy
function in the package forecast.
Usage
periodicdummies(x, values=1)
Arguments
x |
a regular time series (vector or matrix) |
values |
numeric of length 1 (default) or numeric vector of length equal to |
Value
A matrix of class zoo
with periodicity dummies
Author(s)
Genaro Sucarrat, http://www.sucarrat.net/
See Also
is.regular
, zooreg
, zoo
, ts
Examples
##quarterly dummies:
x <- zooreg(rnorm(30), start=2000, frequency=4)
periodicdummies(x)
##monthly dummies:
y <- zooreg(rnorm(30), start=c(2000,1), frequency=12)
periodicdummies(y)
[Package gets version 0.38 Index]