RMSE create a NaN result

Hello, I want to know the error result like RMSE, etc from ARIMA. i have a 45 months of data about Night-lights. i Have an ARIMA model like this

fitARIMA <- arima(newdata, order=c(0,0,0),seasonal = list(order = c(1,0,0), period = 12))
summary(fitARIMA)
### here is the result
Call:
arima(x = newdata, order = c(0, 0, 0), seasonal = list(order = c(1, 0, 0), period = 12))
            
Coefficients:
       sar1  intercept
      0.4770   572.1038
s.e.  0.1608    38.5140
            
sigma^2 estimated as 26880:  log likelihood = -294.88,  aic = 593.76
            
Training set error measures:
              ME RMSE MAE MPE MAPE
Training set NaN  NaN NaN NaN  NaN
Warning message:
In trainingaccuracy(object, test, d, D) :
test elements must be within sample

Anyone know why this is happened, and how to solve this proble? thank you

here is the data i used

 Jan     Feb     Mar     Apr     May     Jun     Jul
2015  467.38  441.67  579.30  600.41  793.38  576.80  741.21
2016  516.02  241.41  443.20  502.98  497.31  668.08  596.89
2017  325.89  253.30  737.37  462.75  609.31  559.05  581.16
2018  428.74  584.53  508.92  655.63  867.83 1059.98  509.34
         Aug     Sep     Oct     Nov     Dec
2015  634.66  582.00  661.35  249.46  482.33
2016  686.76  598.28  598.23  391.71  492.66
2017  680.36  753.18  476.41    3.12  608.01
2018  820.85  825.13

Open a fresh session and cut-and-paste the reprex](https://community.rstudiocom/t/faq-how-to-do-a-minimal-reproducible-example-reprx-for-beginners/23061). If you still have problems, post a revised reprex.

suppressPackageStartupMessages({
  library(forecast)
})

input <- c(467.38,441.67,579.30,600.41,793.38,576.80,741.21,634.66,582.00,661.35,249.46,482.33,516.02,241.41,443.20,502.98,497.31,668.08,596.89,686.76,598.28,598.23,391.71,492.66,325.89,253.30,737.37,462.75,609.31,559.05,581.16,680.36,753.18,476.41,3.12,608.01,428.74,584.53,508.92,655.63,867.83,1059.98,509.34,820.85,825.13)


newdata <- ts(input, start = c(2015,1), frequency = 12)


fitARIMA <- arima(newdata, order=c(0,0,0),seasonal = list(order = c(1,0,0), period = 12))
summary(fitARIMA)
#> 
#> Call:
#> arima(x = newdata, order = c(0, 0, 0), seasonal = list(order = c(1, 0, 0), period = 12))
#> 
#> Coefficients:
#>         sar1  intercept
#>       0.4770   572.1038
#> s.e.  0.1608    38.5140
#> 
#> sigma^2 estimated as 26880:  log likelihood = -294.88,  aic = 595.76
#> 
#> Training set error measures:
#>                     ME     RMSE      MAE       MPE    MAPE     MASE      ACF1
#> Training set 0.7347081 163.9509 121.5846 -349.8801 365.849 0.711663 0.1364518

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.