##These synthetic data were generated with the following:
##n <- 200
##n <- 500
n <- 1000
coords <- cbind(runif(n, 1, 10), runif(n, 1, 10))
sigma.sq <- 10
tau.sq <- 1
phi <- 3/5
C <- sigma.sq*exp(-phi*as.matrix(dist(coords)))
w <- mvrnorm(1, rep(0,n), C)
Y <- w+rnorm(n, 0, sqrt(tau.sq))
Run the code above in your browser using DataLab