var_generator {PRISM.forecast} | R Documentation |
PRISM regressors generator
Description
Stage 1 of PRISM. The function generates prism seasonal components and seasonally adjusted lag components.
Usage
var_generator(
data,
data.early,
stl = TRUE,
n.lag = 1:52,
s.window = 52,
n.history = 700
)
Arguments
data |
time series of interest as xts, last element can be NA. |
data.early |
historical time series of response variable before Google Trend data is available. (e.g., unemployment initial claim prior to 2004) |
stl |
if TRUE, use STL seasonal decomposition; if FALSE, use classic additive seasonal decomposition. |
n.lag |
the number of lags to be used as regressor in Stage 2 of PRISM (by default = 1:52 for weekly data) |
s.window |
seasonality span (by default = 52 for weekly data) |
n.history |
training period for seasonal decomposition. (by default = 700 wks) |
Value
A list of following named objects
-
y.lags
seasonally adjusted components, z_lag, and seasonal components, s_lag.
[Package PRISM.forecast version 0.2.1 Index]