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