Skip to contents

Returns the smoothed estimate of the latent true value for the in-sample periods, i.e. the model's revision-adjusted signal.

Usage

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

Arguments

object

An object of class jvn_model.

...

Ignored.

Value

A tibble with columns time, estimate, lower and upper.

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(fitted(fit))
#> # A tibble: 6 × 4
#>   time       estimate   lower   upper
#>   <date>        <dbl>   <dbl>   <dbl>
#> 1 2002-10-01  0.0576  -0.0402 0.155  
#> 2 2003-01-01 -0.00633 -0.104  0.0915 
#> 3 2003-04-01 -0.0933  -0.191  0.00450
#> 4 2003-07-01  0.461    0.363  0.559  
#> 5 2003-10-01  0.467    0.369  0.564  
#> 6 2004-01-01  0.758    0.661  0.856  
# }