简体   繁体   中英

MA terms in arima

With the arima function I found some nice results, however now i have trouble interpreting them for use outside R. I am currently struggeling with the MA terms, here is a short example:

ser=c(1, 14, 3, 9)        #Example series
mod=arima(ser,c(0,0,1))   #From {stats} library
mod

#Series: ser
#ARIMA(0,0,1) with non-zero mean
#
#Coefficients:
#          ma1  intercept
#      -0.9999     7.1000
#s.e.   0.5982     0.8762
#
#sigma^2 estimated as 7.676:  log likelihood = -10.56
#AIC = 27.11   AICc = Inf   BIC = 25.27

mod$resid

#Time Series:
#Start = 1
#End = 4
#Frequency = 1
#[1] -4.3136670  3.1436951 -1.3280435  0.6708065

predict(mod,n.ahead=5)

#$pred
#Time Series:
#Start = 5
#End = 9
#Frequency = 1
#[1] 6.500081 7.100027 7.100027 7.100027 7.100027
#
#$se
#Time Series:
#Start = 5
#End = 9
#Frequency = 1
#[1] 3.034798 3.917908 3.917908 3.917908 3.917908
?arima

When looking at the specification this formula is presented: X[t] = a[1]X[t-1] + … + a[p]X[tp] + e[t] + b[1]e[t-1] + … + b[q]e[tq]

Given my choice of AR and MA terms, and considering that i have included a constant this should reduce to: X[t] = e[t] + b[1]e[t-1] + constant

However this does not hold up when i compare the results from R with manual calculations: 6.500081 != 6.429261 == -0.9999 * 0.6708065 + 7.1000

Furthermore I can also not succeed in reproducing the insample errors, assuming i know the first one this should be possible: -4.3136670 * -0.9999 +7.1000 != 14 - 3.1436951 3.1436951 * -0.9999 +7.1000 != 3 + 1.3280435 -1.3280435 * -0.9999 +7.1000 != 9 - 0.6708065

I hope someone can shed some light on this matter so i will actually be able to use the nice results that I have obtained.

Hi not having your exact data makes it a bit hard to give an appropriate answer - but I think the explanations on this site may help you. The intercept is a bit confusingly named and may in fact be - depending on your specification a sample mean. Actually if I read your code correctly this is also true for your estimated results.

Based on the replies given on stackexchange this seems to be the answer: When MA terms approach -1 the model is near non-invertible and therefore should not be used. In these situation the manual calculations may not match the calculations in R even though the interpretation is actually correct.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM