# NOT RUN {
m=50; raneff=NorRanGen(m)
# Note: If X ~ N(0, I), then tran X ~ N(0, A) with
# A being the cov matrix of AR(1), which contains the standard deviations sigma and the
# correlation coeff rho=exp(-1/m).
# i.e. corr= (1 rho rho^2 ... rho^(m-1)
# rho 1 rho ... rho^(m-2)
# ...................
# rho^(m-1) rho^(m-2) ... rho )
#
# To see the correlation values, run the following example
# j1=seq(25); cv=numeric()
# for (j in 1:25){
# lag=abs(j1-j)/25; cv=rbind(cv, exp(-lag))
#}
# row.names(cv)=j1; colnames(cv)=j1; cv[1,]
# }
Run the code above in your browser using DataLab