I was playing around in R with simulating random walks. At some point I tried this model:
x = NULL
x[1] = 0
for (i in 2:2000) {
x[i] = -x[i-1] + rnorm(1)
}
Below are a time series plot, the acf and pacf.
Now, what exactly is this? Is it also called random walk? The time series plot doesn't look like one (seems to be stable around the mean). It's not, to me, clear if the variance is increasing over time. The ACF and PACF, however, is what one might expect except for the oscillating pattern.
Is there anything concrete that can be modelled with this model?
R
simulation to provide insight. It plots the variance versus $t$ for $t$ out ton
, based onn.sim
independent path realizations. Total time is about one second.n <- 5e2; n.sim <- 2e4; system.time({ x <- matrix(0, n, n.sim); e <- matrix(rnorm(n*n.sim), n, n.sim); for (i in 2:n) x[i,] <- -x[i-1,] + e[i,]; }); plot(apply(x, 1, var), col="#00000040", asp=1, xlab="t", ylab="Variance"); abline(0:1, col="Red", lwd=2)
$\endgroup$