Whenever I run a code to simulate AR/ARMA/SARIMA process using command: (say) *m1=(arima(z, order = c(1, 0, 1), seasonal = list(order = c(0, 0, 0), period = NA),xreg = NULL, include.mean = FALSE, transform.pars = FALSE, fixed = NULL,init = NULL))* Even for moderately large values of phi (the AR part) it returns back the error1 and stops the simulation process. *Error#1:* *Error in stats:::arima(x = x, order = order, seasonal = seasonal, xreg xreg, : non-stationary AR part from CSS* *In addition: Warning message:* *In `[<-.factor`(`*tmp*`, ri, value = NA_integer_) : invalid factor level, NAs generated* *Error#2:* *Error in optim(init[mask], armafn, method = optim.method, hessian = TRUE, : non-finite finite-difference value [1]* What I have noted is that if we adopt the ML method it will forcefully make the process to attain stationarity. And on doing so the error#1 is no more there but now I see error#2 and this new message keeps on intervening all the time and I am not able to run more than 7 iterations Can you please help me in getting rid of it Thanks a million [[alternative HTML version deleted]]