forecast_q | R Documentation |
forecast_q()
uses quarterly vintages generated by roll()
to predict the
value of another time series for the next quarter.
forecast_q(r_list, data, fd = T)
r_list |
A Google Trends time series in form of a tibble (or tsibble) which is used to predict the next quarter in data. |
data |
A tibble with some data you want to predict for the next quarter that is somewhat correlated with the data in r_list. |
fd |
A logical value to indicate if you want to use the first differences in r_list (true) or normal values (false). |
Returns a list with the the predicted data and the used model results.
Google Data should be log-transformed currently it uses a RIDGE-Regression but other models such as OLS, LASSO or PCA are available.
Check the service_imports.R
file under /vignettes
for an
real example and to understand how to use this function and its
twin, forecast_m()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.