1 context("Check that forecasters behave as expected")
3 test_that("Average+Zero method behave as expected",
6 test_that("Persistence+Zero method behave as expected",
9 test_that("Neighbors+Zero method behave as expected",
12 test_that("Neighbors+Neighbors method behave as expected",
17 #TODO: with and without shift at origin (so series values at least forst ones are required)
25 level = mean(s[[index]])
26 serie = s[[index]] - level + rnorm(L,sd=0.05)
27 # 10 series with NAs for index 2
28 if (index == 2 && i >= 60 && i<= 90)
29 serie[sample(seq_len(L),1)] = NA
30 series[[i]] = list("level"=level,"serie"=serie) #no need for more :: si : time !!!
32 data = new("Data", data=series)
34 dateIndexToInteger = function(index, data)