getsimulations.Rd
Obtain simulations (when relevant) from a selected time series
getsimulations(obj, selected_series, transpose = FALSE)
result from ridge2f (multivariate time series forecast with simulations)
name of the time series selected
return a transposed time series
require(fpp)
obj <- ahead::ridge2f(fpp::insurance, h = 7,
type_pi = "bootstrap", B = 5)
#>
|
| | 0%
|
|============== | 20%
|
|============================ | 40%
|
|========================================== | 60%
|
|======================================================== | 80%
|
|======================================================================| 100%
print(getsimulations(obj, selected_series = "TV.advert"))
#> $series
#> Series 1 Series 2 Series 3 Series 4 Series 5
#> May 2005 8.546350 8.890481 10.490874 7.181272 8.878271
#> Jun 2005 8.957984 6.621006 9.305770 9.360902 9.650251
#> Jul 2005 10.521963 9.408312 9.127883 10.087084 6.687064
#> Aug 2005 8.777585 10.599011 7.008770 8.178792 7.752375
#> Sep 2005 7.662264 6.451488 5.649254 8.965963 9.557945
#> Oct 2005 7.242733 8.975899 7.183429 7.912189 7.850653
#> Nov 2005 7.530277 7.055409 7.673654 7.194058 9.338306
#>
#> $name
#> [1] "TV.advert"
#>
print(getsimulations(obj, selected_series = "Quotes"))
#> $series
#> Series 1 Series 2 Series 3 Series 4 Series 5
#> May 2005 15.09470 14.69348 17.25320 11.68915 14.67039
#> Jun 2005 15.26574 12.07124 15.51548 15.16186 15.53732
#> Jul 2005 17.14212 16.32133 15.51882 16.50681 10.79614
#> Aug 2005 14.47419 16.30191 13.05521 13.47757 12.45865
#> Sep 2005 13.80475 10.75109 11.37936 14.49698 15.36642
#> Oct 2005 13.29210 12.82525 13.04494 12.82710 12.55254
#> Nov 2005 12.93090 10.91749 14.34255 12.26039 15.04672
#>
#> $name
#> [1] "Quotes"
#>
print(getsimulations(obj, selected_series = "TV.advert", transpose = TRUE))
#> $series
#> date1 date2 date3 date4 date5 date6 date7
#> Series 1 8.546350 8.957984 10.521963 8.777585 7.662264 7.242733 7.530277
#> Series 2 8.890481 6.621006 9.408312 10.599011 6.451488 8.975899 7.055409
#> Series 3 10.490874 9.305770 9.127883 7.008770 5.649254 7.183429 7.673654
#> Series 4 7.181272 9.360902 10.087084 8.178792 8.965963 7.912189 7.194058
#> Series 5 8.878271 9.650251 6.687064 7.752375 9.557945 7.850653 9.338306
#>
#> $name
#> [1] "TV.advert"
#>
print(getsimulations(obj, selected_series = "Quotes", transpose = TRUE))
#> $series
#> date1 date2 date3 date4 date5 date6 date7
#> Series 1 15.09470 15.26574 17.14212 14.47419 13.80475 13.29210 12.93090
#> Series 2 14.69348 12.07124 16.32133 16.30191 10.75109 12.82525 10.91749
#> Series 3 17.25320 15.51548 15.51882 13.05521 11.37936 13.04494 14.34255
#> Series 4 11.68915 15.16186 16.50681 13.47757 14.49698 12.82710 12.26039
#> Series 5 14.67039 15.53732 10.79614 12.45865 15.36642 12.55254 15.04672
#>
#> $name
#> [1] "Quotes"
#>