library(fpp2)
library(ggthemes)

Simulate Random Walk Series

We can now simulate a random walk series in R by supplying the appropriate parameters to the arima.sim() function, a core R function.

If we plot the first order difference of the Random Walk series, we see that it resembles white noise, as we would expect.