ni <- c( 30, 300, 3000)
simDat <- simRandWalk( nc=3, ni=ni, init.var=1, seq.var=0.1)
par( mfrow=c( 1, 3))
plot( 1:ni[1], simDat[1:ni[1],2], type='b', pch=20, ylab="Random Variable", xlab="Index", main="Chain 1")
plot( 1:ni[2], simDat[ni[1]+1:ni[2],2], type='b', pch=20, ylab="Random Variable", xlab="Index", main="Chain 2")
plot( 1:ni[3], simDat[sum(ni[1:2])+1:ni[3],2], type='b', pch=20, ylab="Random Variable", xlab="Index", main="Chain 3")
Run the code above in your browser using DataLab