Search code examples
rtime-seriesarima

summary function in R not giving desired output


I am just trying to build an arima model using the arima() function and want to get some summary stats like AIC and RMSE using the summary() function. But the summary function is giving me some strange output when I run it in RStudio (R 4.3.1) on my laptop.

Here is the code I ran on my system:

library(datasets)
library(tseries)
data("presidents")
m_111 <- arima(presidents, order = c(1,1,1))
summary(m_111)

This is the output I got:

> summary(m_111)
          Length Class  Mode     
coef        2    -none- numeric  
sigma2      1    -none- numeric  
var.coef    4    -none- numeric  
mask        2    -none- logical  
loglik      1    -none- numeric  
aic         1    -none- numeric  
arma        7    -none- numeric  
residuals 120    ts     numeric  
call        3    -none- call     
series      1    -none- character
code        1    -none- numeric  
n.cond      1    -none- numeric  
nobs        1    -none- numeric  
model      10    -none- list   

The output I was expecting is something like this:

expected output from summary

I don't understand why am I not getting the desired output.


Solution

  • There is no summary.arima() method in the stats package. The image shows the output from the summary method from the forecast package. So use library(forecast).