I believe that arima.sim function can do this efficiently. How can I simulate this in R using arima.sim function (or another efficient function)?
My attempt
Assuming I want to generate 1000 observations for the model with rho=0.45 and sigma_u^2=0.2,
arima.sim(n=1000,list(ar=0.45),rand.gen=rnorm, sd=sqrt(0.2))
The problem is that I'm not sure if the command initializes exactly as the model above.

