text_nowcast: text nowcast

Description Usage Arguments Value Examples

View source: R/text_nowcast.R

Description

text nowcast

Usage

1
text_nowcast(x, y, intercept)

Arguments

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.

Value

the nowcast h=0 for the variable y.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

lucasgodeiro/TextForecast documentation built on Sept. 19, 2019, 3:41 a.m.