2

I simulated in R a MA(1) process using arima.sim:

y <- arima.sim(model=list(ma=c(0.3)), mean=2, n=10000)

Unfortunately, testing the coefficients gives me an intercept of 2.59, but not 2, as it should be by definition of a MA process.

I think that R calculates the mean/intercept like for an AR(1) process... Does someone know how to get a better simulation or fit for a MA(1) model (means: with an intercept of 2)?

Thanks!

nrussell
  • 18,382
  • 4
  • 47
  • 60
Bukowski
  • 53
  • 1
  • 7

1 Answers1

1

I think this looks the way it should.

y <- arima.sim(model=list(ma=0.3, order =c(0,0,1)), n=10000)
y<-y+2

>arima(y, order = c(0,0,1))

Call:
arima(x = y, order = c(0, 0, 1))

Coefficients:
         ma1  intercept
      0.3042     1.9829
s.e.  0.0095     0.0129

sigma^2 estimated as 0.9856:  log likelihood = -14117.02,  aic = 28240.04

For AR this works:

y <- arima.sim(model=list(ar=0.3, order =c(1,0,0)),mean=1.4, n=10000)

Here " mean " is actually c = \mu(1-\phi) in case of an AR(1) process.

Alex
  • 4,925
  • 2
  • 32
  • 48
  • Yes, that makes sense, just to "shift" the model like this. I think the "mean" function is only useful for AR processes. Thanks! – Bukowski Oct 27 '15 at 19:38