# NOT RUN {
# Summarize Data
summary(ContrivedData)
# Initial OLS model
contrived.ols<-lm(y~x.1+x.2,data=ContrivedData)
# summary(contrived.ols)
# Set seed
set.seed(1241060320)
M <- 100
#M<-10000
contrived.run <- metropolis.krige(y ~ x.1 + x.2, coords = c("s.1","s.2"),
data = ContrivedData, n.iter = M, n.burnin = 20, range.tol = 0.05)
contrived.run.mat <- mcmc.samples(contrived.run)
### Alternatively, use generic methods
contrived.run.mat <- as.matrix(contrived.run)
contrived.run.df <- as.data.frame(contrived.run)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab