Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Matt Asher posted an R experiment on R-bloggers yesterday simulating the random walk
which has the property of avoiding zero by quickly switching to a large value as soon as
I reran the same experiment as Matt in a Monte Carlo perspective, using the R program
resu=matrix(0,ncol=100,nrow=25) sampl=rnorm(100) for (i in 1:25){ for (t in 2^(i-1):2^i) sampl=sampl+rnorm(100)/sampl resu[i,]=sampl } boxplot(as.data.frame(t(abs(resu))),name=as.character(1:25),col="wheat3")
which is thus bounded from below by a null recurrent process, which almost surely goes to infinity. Therefore the above Markov chain cannot have a stationary distribution or even a stationary measure: it almost surely goes to (plus or minus) infinity.
Filed under: R, Statistics Tagged: Markov chain, R-bloggers, random walk, recurrence, transience
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.