1

I'm building ARIMA model on my data and when I try to check the Measure Accuracy errors , it print NA!

I don't know where I missed up. Does any one have suggestions please ?

 accuracy(forecast_data, test_data)
$Models
   Call              $Fit.criteria
                 "Min.max.accuracy MAE MAPE MSE RMSE NRMSE.mean NRMSE.median
"Not supported"   NA                NA   NA  NA   NA  NA           NA
"Not supported"   NA                NA   NA  NA   NA  NA           NA
"Not supported"   NA                NA   NA  NA   NA  NA           NA
"Not supported"   NA                NA   NA  NA   NA  NA           NA
          

Here's my code:

auto_ARIMA <- auto.arima(training_data, trace=TRUE, ic ="aicc", approximation=FALSE, stepwise=FALSE)
forecast_data <- forecast(object=test_data, model= auto_ARIMA)
accuracy(forecast_data, test_data)

my data is in Time series format and has no NA..

Any help will be appreciated.

updates:

Here's part of what dput(training_data) & dput(test_data) print:

dput(training_data)
c(601L, 215L, 147L, 275L, 707L, 1509L, 2118L, 1506L, 1439L, 1745L, 
1882L, 1773L, 1752L, 1773L, 1727L, 1823L, 1860L, 2020L, 1744L, 
1670L, 1498L, 1372L, 1262L, 723L, 313L, 166L, 129L, 252L, 695L, 
1510L, 2051L, 1484L, 1417L, 1838L, 1756L, 1740L, 1756L, 1675L)

dput(training_data)
c(601L, 215L, 147L, 275L, 707L, 1509L, 2118L, 1506L, 1439L, 1745L, 
1882L, 1773L, 1752L, 1773L, 1727L, 1823L, 1860L, 2020L, 1744L, 
1670L, 1498L, 1372L, 1262L, 723L, 313L, 166L, 129L, 252L, 695L, 
1510L, 2051L, 1484L, 1417L, 1838L, 1756L, 1740L, 1756L, 1675L)
TylerH
  • 20,799
  • 66
  • 75
  • 101
Reta
  • 363
  • 3
  • 4
  • 15
  • Please make your question reproducible by including, e.g., `dput(training_data)` and `dput(test_data)` to your question. – Julius Vainora Feb 13 '19 at 10:33
  • I updated my question with the result of dput(training_data) & dput(test_data). – Reta Feb 13 '19 at 17:58
  • First you write `model_forecast`, then `forecast_data`... Doing the latter with your data there is a clear error `Not enough forecasts. Check that forecasts and test data match` – Julius Vainora Feb 13 '19 at 18:08
  • Soory , It was typo when I posted my question here. I checked my code and the accuracy result is for the forecast_data. So if there's a letter and my forecast, how to avoid this problem? I'm using ARIMa model with my data where I have 3 months to train the model and use 2 weeks for forecasting. ARIMA works with limited data as I read. – Reta Feb 13 '19 at 18:16

0 Answers0