predict.revision_model: Forecasts from a Revision Model

View source: R/model-methods.R

predict.revision_modelR Documentation

Forecasts from a Revision Model

Description

Returns the out-of-sample estimates of the model's latent signal produced by the forecast horizon h supplied to kk_nowcast() or jvn_nowcast(). The horizon is fixed at estimation time, so refit with a different h to change it.

Usage

## S3 method for class 'revision_model'
predict(object, ...)

Arguments

object

A fitted model object inheriting from revision_model, such as a kk_model or a jvn_model.

...

Ignored.

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.revision_model(), fitted.revision_model(), jvn_nowcast(), kk_nowcast(), logLik.revision_model(), nobs.revision_model(), plot.revision_model(), print.revision_model(), residuals.revision_model(), revision_model, states(), summary.revision_model(), vcov.revision_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)

reviser documentation built on Sept. 14, 2026, 9:09 a.m.