Extracts the residuals.
# S3 method for class 'NNETAR'
residuals(object, ...)
A vector of fitted residuals.
as_tsibble(airmiles) %>%
model(nn = NNETAR(box_cox(value, 0.15))) %>%
residuals()
#> # A tsibble: 24 x 3 [1Y]
#> # Key: .model [1]
#> .model index .resid
#> <chr> <dbl> <dbl>
#> 1 nn 1937 NA
#> 2 nn 1938 -0.447
#> 3 nn 1939 0.107
#> 4 nn 1940 0.418
#> 5 nn 1941 0.0535
#> 6 nn 1942 -0.668
#> 7 nn 1943 -0.312
#> 8 nn 1944 0.153
#> 9 nn 1945 0.678
#> 10 nn 1946 1.26
#> # ℹ 14 more rows