Description Usage Arguments Value Examples
View source: R/text_forecast.R
Text Forecast function
1 | text_forecast(x, y, h, intercept)
|
x |
the input matrix x. |
y |
the response variable |
h |
the forecast horizon |
intercept |
TRUE for include intercept in the forecast equation. |
The h step ahead forecast
1 2 3 4 5 6 7 8 9 10 | set.seed(1)
data("stock_data")
data("news_data")
y=as.matrix(stock_data[,2])
w=as.matrix(stock_data[,3])
data("news_data")
data("optimal_factors")
pc=optimal_factors
z=cbind(w,pc)
fcsts=text_forecast(z,y,1,TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.