Simulates future paths from a dataset using a fitted model. Innovations are
sampled by the model's assumed error distribution. If bootstrap
is TRUE
,
innovations will be sampled from the model's residuals. If new_data
contains the .innov
column, those values will be treated as innovations.
# S3 method for TSLM generate(x, new_data, specials, bootstrap = FALSE, ...)
x | A fitted model. |
---|---|
new_data | A |
specials | (passed by |
bootstrap | If |
... | Additional arguments for forecast model methods. |
#> # A tsibble: 24 x 3 [1M] #> # Key: .model [1] #> .model index .sim #> <chr> <mth> <dbl> #> 1 lm 1979 Jan 7608. #> 2 lm 1979 Feb 6856. #> 3 lm 1979 Mar 7650. #> 4 lm 1979 Apr 7832. #> 5 lm 1979 May 8562. #> 6 lm 1979 Jun 9106. #> 7 lm 1979 Jul 9912. #> 8 lm 1979 Aug 9198. #> 9 lm 1979 Sep 8138. #> 10 lm 1979 Oct 8520. #> # … with 14 more rows