var_generator: PRISM regressors generator

Description Usage Arguments Value

View source: R/var_generator.R

Description

Stage 1 of PRISM. The function generates prism seasonal components and seasonally adjusted lag components.

Usage

1
2
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


ryanddyi/prism documentation built on Oct. 25, 2020, 11:25 a.m.