Simulating random walk with "known" prediction

by user2974951   Last Updated September 11, 2019 09:19 AM

Suppose a random walk that looks like this

set.seed(420)
x=rnorm(1000)
y=rep(NA,length(x))
y[1]=x[1]
for (i in 2:length(x)) {
  y[i]=y[i-1]+x[i]*0.7
}

enter image description here

The first 700 points are actual data, the other 300 are predictions. The predictions are assumed to be "true", however we suspect that the path will be a lot more variable than predicted.

How can we simulate some random walks, that will oscillate around the predictions (having similar mean) but with arbitrary variability. This to get a better idea of possible paths taken during this time.



Related Questions


Updated April 25, 2017 16:19 PM

Updated April 29, 2015 21:08 PM

Updated June 03, 2017 20:19 PM

Updated October 22, 2018 17:19 PM

Updated February 19, 2017 18:19 PM