Displaying 1 result from an estimated 1 matches for "296218".
Did you mean:
29621
2006 Feb 15
1
Generating random walks
Hello, here is another question, how do I generate
random walk models in R? Basically, I need an AR(1)
model with the phi^1 value equal to 1:
Yt = c + Yt-1 + E
where E is random white noise.
I tried using the arima.sim command:
arima.sim(list(ar=c(1)), n = 1000, rand.gen = rnorm)
but got this error since the model I am generating is
not stationary:
Error in arima.sim(list(ar = c(1)), n =