?arima.sim set.seed(1359) #simulate the first difference theta=-.8;n=50;phi0=-1 W=arima.sim(model=list(ma=-theta),n=n) W=W+phi0 # integrate the W's to get the IMA(1,1) process Y=cumsum(W) plot(ts(Y))