无法容纳ARIMA

时间:2019-06-13 16:51:43

标签: r time-series arima

我的问题是我有一个无法找到最佳ARIMA模型的时间序列。我需要一个带有正常残差的ARIMA,并且当残差通过J.Bera检验时,残差图就不会了。

我无法安装任何型号,请帮忙。

这是我正在使用的代码:

#Lectura de los datos
getSymbols("CEU2000000001", src="FRED")
emp<-(CEU2000000001)

emp.ts=ts(emp,frequency=12,start = c(1939,1,1))
#Descompose the serie
emp.ts.desc<-decompose(emp.ts)

#For the variance
emp.ts.log<-log(emp.ts)

#First difference
x1<-diff(emp.ts.log)
Acf(x1, na.action = na.pass)
Pacf(x1, na.action=na.pass)

#Monthly difference
x12.x1<-diff(x1, lag=12)
Acf(x12.x1, na.action = na.pass)
Pacf(x12.x1, na.action=na.pass)

#Stacionary test
adf.test(x12.x1, alternative = "stationary")

#Arima

a1<-arima(emp.ts, c(2,1,2),c(0,0,1)) #That order f.e. I tried with all kinds of orders. ALso tried with auto.arima, but neither get the optimal solution.
a1
Acf(a1$residuals, na.action=na.pass)
Pacf(a1$residuals, na.action=na.pass)
jarque.bera.test(a1$residuals) #Can´t go with H0=normality
cpgram(a1residuals) #Not really bad output

0 个答案:

没有答案