text_nowcast | R Documentation |
text nowcast
text_nowcast(x, y, intercept)
x |
the input matrix x. It should have 1 observation more that y. |
y |
the response variable |
intercept |
TRUE for include intercept in the forecast equation. |
the nowcast h=0 for the variable y.
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) t=length(y) ncsts=text_nowcast(z,y[1:(t-1)],TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.