Returns the out-of-sample estimates of the latent true value produced by
the forecast horizon h supplied to jvn_nowcast(). The horizon is fixed
at estimation time, so refit with a different h to change it.
Usage
# S3 method for class 'jvn_model'
predict(object, ...)Value
A tibble with columns time, estimate, lower and upper.
Has zero rows when the model was fitted with h = 0.
See also
Other revision nowcasting:
coef.jvn_model(),
coef.kk_model(),
fitted.jvn_model(),
fitted.kk_model(),
jvn_nowcast(),
kk_nowcast(),
logLik.jvn_model(),
logLik.kk_model(),
nobs.jvn_model(),
nobs.kk_model(),
plot.jvn_model(),
plot.kk_model(),
predict.kk_model(),
print.jvn_model(),
print.kk_model(),
residuals.jvn_model(),
residuals.kk_model(),
states(),
summary.jvn_model(),
summary.kk_model(),
vcov.jvn_model(),
vcov.kk_model()
Examples
# \donttest{
gdp_growth <- dplyr::filter(
tsbox::ts_pc(reviser::gdp),
id == "EA",
time >= min(pub_date),
time <= as.Date("2020-01-01")
)
gdp_growth <- tidyr::drop_na(gdp_growth)
df <- get_nth_release(gdp_growth, n = 0:3)
fit <- jvn_nowcast(
df = df, e = 4, ar_order = 2, h = 2, include_noise = FALSE
)
predict(fit)
#> # A tibble: 2 × 4
#> time estimate lower upper
#> <date> <dbl> <dbl> <dbl>
#> 1 2020-04-01 -2.69 -3.85 -1.54
#> 2 2020-07-01 -1.46 -2.88 -0.0474
# }
