I need to simulate an AR(1) process with the following equation in R:
$$ X_{t} = 5 + 0.5X_{t-1}+Z_t $$
Where $Z_t$ ~ White Noise(0,1) and $T=500$.
I know I should be using the arima.sim
function from the forecast
package with parameters n = 500
and ar = c(0.5)
but I do not know how to account for the $ \delta = 5$ or the fact that $Z_t$ is white noise with mean 0 and sd 1. I have been unable to find clear documentation on how to do this.