Skip to contents

Difference between the most mature release included in the estimation and the smoothed estimate of the latent true value. These are measurement residuals of that release, not one-step-ahead prediction errors.

Usage

# S3 method for class 'jvn_model'
residuals(object, ...)

Arguments

object

An object of class jvn_model.

...

Ignored.

Value

A tibble with columns time and residual.

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, include_noise = FALSE)
head(residuals(fit))
#> # A tibble: 6 × 2
#>   time         residual
#>   <date>          <dbl>
#> 1 2002-10-01  0.0000826
#> 2 2003-01-01  0.000321 
#> 3 2003-04-01 -0.00242  
#> 4 2003-07-01  0.000411 
#> 5 2003-10-01 -0.00158  
#> 6 2004-01-01  0.0000534
# }