# NOT RUN {
if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234)
data(b50)
# First we scale the algorithm, and study how well the chain is mixing.
test <- binom.krige(b50, krige = list(cov.pars = c(1,1), beta = 1),
mcmc.input = mcmc.control(S.scale = 0.2, thin = 1))
plot(qlogis(test$prevalence[45,]), type = "l")
acf(qlogis(test$prevalence[45,]), type = "correlation", plot = TRUE)
# }
# NOT RUN {
# Now we make prediction (we decide to thin to every 10, which is the default),
# where we now use S.scale = 0.7.
test2 <- binom.krige(b50, locations = cbind(c(0.5,0.5, 1, 1), c(0.4, 1, 0.4, 1)),
krige = krige.glm.control(cov.pars = c(1,1), beta = 1),
mcmc.input = mcmc.control(S.scale = 0.7))
image(test2)
contour(test2)
# }
Run the code above in your browser using DataLab