How about: y<-cumsum(c(0,rnorm(100))) On Tue, 10 Feb 2004, allan clark wrote: > hi all > > how does one simulate a random walk process? > > i.e > > y(0)=0 > > y(t)=y(t-1)+ e(t) > > where e(t) is normal(0,1) say. > > Regards > allan >