You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really a problem with the package. It's just a bad model for these data. Reducing beta to something much smaller would help. Better still if users use some common sense.
See https://stackoverflow.com/questions/27346384/error-in-ets-model-of-r for an example.
x <- c(318.396,334.049,275.152,239.965,218.595,206.482,180.055,147.576,115.93,88.161,69.423,61.816,57.515,53.365,48.779,41.513,34.09,29.056,44.586,76.709,90.059,82.24,
69.394,55.876,42.505,33.565,23.872,18.723,16.439,18.428,19.074,19.124,20.076,21.739,35.975,35.595,32.656,32.899,34.743,37.784,41.673,43.843,43.817,41.811,40.38,
41.767,42.773,43.812,50.827,94.426,154.512,165.881,158.039,174.111,188.634,150.321,135.048,91.498,57.92,47.27,39.026,32.75,31.148,31.932,37.916,50.955,60.594,58.847,55.939,
51.943,47.963,43.776,36.716,34.545,33.158,32.703,32.995,30.251,27.217,25.6,27.864,31.136,28.245,29.442,34.383,33.801,36.912,42.339,43.717,41.088,43.572,52.401,55.895,
53.734,52.923,53.684,59.275,60.272,69.015,111.21,712.14,878.62,881.5,861.96,854.94,766.55,634.74,507.3,396.1,315.74,250.08,209.05,185.44,168.82,165.97,180.06,182.28,
169.99,169.86,275.26,471.3,564.22,545.28,501.58,452.2,251.86,192.38,134.87,97.73,70.24,48.74,33.14,21.79,27.13,61.49,98.84,117.86,112.79,111.76,116.32,126,130.09,115.9,107.36,
125.08,147.48,152.56,154.25,162.43,165.14,180.17,192.09,198.83)
length_data <- length(x)
length_train <- round(length_data*0.70)
forecast_period <- length_data-length_train
x <- ts(x, frequency = 52, start = c(1, 1))
train_data <- x[1:length_train]
train_data <- ts(train_data, frequency = 52, start = c(1, 1))
ets_output <- ets(train_data) # fit the ETS Model
ets_forecast <- data.frame(forecast(ets_output, h = forecast_period))
The text was updated successfully, but these errors were encountered: