Returns the out-of-sample estimates of the latent efficient value produced
by the forecast horizon h supplied to kk_nowcast(). The horizon is
fixed at estimation time, so refit with a different h to change it.
Usage
# S3 method for class 'kk_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.jvn_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
df <- get_nth_release(
tsbox::ts_span(
tsbox::ts_pc(dplyr::filter(reviser::gdp, id == "US")),
start = "1980-01-01"
),
n = 0:1
)
df <- na.omit(dplyr::select(df, -c("id", "pub_date")))
fit <- kk_nowcast(df, e = 1, h = 2, model = "KK", method = "MLE")
predict(fit)
#> # A tibble: 2 × 4
#> time estimate lower upper
#> <date> <dbl> <dbl> <dbl>
#> 1 2024-10-01 0.144 -2.33 2.62
#> 2 2025-01-01 0.0286 -2.50 2.55
