# NOT RUN {
#Set seed
set.seed(1241060320)
#For simple illustration, we set to few iterations.
#But much more are needed for the realistic estimation.
#In this case, a 10,000-iteration run converges to the true parameters.
M1<-5
contrived.run<-metropolis.krige(y=ContrivedData$y,X=covariates,range.tol=0.05,
east=ContrivedData$s.1,north=ContrivedData$s.2,mcmc.samples=M1)
#Acceptance rates for the first 5 iterations.
#"Acceptance percentages: Coefficients=50%. Nugget=75%. Decay=75%.
#Partial sill=75%."
#Update for another 5 iterations.
M2<-5
contrived.run.update<-update.krige(krige.mat=contrived,mcmc.samples=M2,
accepted.beta=0.5,accepted.nugget=0.75,accepted.decay=0.75,
accepted.psill=0.75,y=ContrivedData$y,X=covariates,range.tol=0.05,
east=ContrivedData$s.1,north=ContrivedData$s.2)
# }
Run the code above in your browser using DataLab