# T_t is the stochastic trend modeled as a random walk n=50 beta1=.3 sigmab=.5 b=rnorm(n,mean=beta1,sd=sigmab) T=cumsum(b) plot(T,type='o') # Above, model stationary velocity or first derivative, or first difference # Now consider stationary acceleration n=20 beta1=0.3 sigmab=.5 b=rnorm(n,mean=beta1,sd=sigmab) b T=cumsum(cumsum(b)) plot(T,type='o')