[R] arima.sim and first innovation: why nevertheless assume 0?

Matthieu Stigler matthieu.stigler at gmail.com
Fri Nov 14 12:50:20 CET 2008

```Hello

I want to create a ARIMA(0,1,1) model giving my own innovations. I don't
understand why even if I feed the arima.sim() function with innov and
start.innov it takes a value of 0 for the first value. After that, I
don't understand anymore how the series is constructed.

set.seed(1)
e<-rnorm(201)

#I give 200 observations to take as innovations and 1 for the burn-in
sample (ARIMA(0,1,1) needs one pre-sample observation to run):
arima.sim(model=list(order=c(0,1,1), ma=0.5), n=200,
innov=e[-1],start.innov=e[1], n.start=1)

#the first value is zero! mentionned in manual, but why is it also the
case for user-given innovations?
#Furthermore, remark that it creates 201 observations and not 200 as
given as argument. Actualy, the function gives always n+1 when innov is
given by user

#The value should be: y(t)= y(t-1) +e(t) + 0.5*e(t-1)
e[1]+e[2]+0.5*e[1]

#ok, assume the first one is zero, now compute the second one:
0+e[3]+e[2]*0.5
#and this is not what the arima.sim gives...

Is my reasonning correct? How to explain that the first value is zero?
Hos is the series constructed? And why does it returns n+1 values?

Thank you for your help!

Matthieu Stigler

```

More information about the R-help mailing list