if (FALSE) {
data(rhizoctonia)
### Define the model
corrf <- "spherical"
kappa <- 0
ssqdf <- 1
ssqsc <- 1
betm0 <- 0
betQ0 <- .01
family <- "binomial.probit"
formula <- Infected ~ 1
atsample <- ~ Xcoord + Ycoord
### Skeleton points
philist <- seq(100, 200, 10)
omglist <- 0
parlist <- expand.grid(linkp=0, phi=philist, omg=omglist, kappa = kappa)
### MCMC sizes
Nout <- 100
Nthin <- 1
Nbi <- 10
## Select proposals
K <- 3 # Choose 3 proposals
istart_SEQ <- 6 # Start with middle
istart_MNX <- istart_ENT <- c(6, 2, 10)
cooling_MNX <- .05/log((0:24 %/% 5)*5 + exp(1))
cooling_ENT <- .3/log((0:49 %/% 10)*10 + exp(1))
prop_SEQ <- select_proposals_SEQ(pargrid = parlist, K = K,
istart = istart_SEQ,
relativeSE = TRUE,
N1 = Nout, N2 = Nout,
Nthin = Nthin, Nbi = Nbi,
formula = formula, family = family,
data = rhizoctonia, weights = Total,
atsample = atsample, corrfcn = corrf,
betm0 = betm0, betQ0 = betQ0,
ssqdf = ssqdf, ssqsc = ssqsc,
dispersion = 1, longlat = FALSE,
nbatch1 = 0.5, nbatch2 = 0.5,
bvmethod = "TukeyHanning",
transf = "mu")
prop_MNX <- select_proposals_MNX(pargrid = parlist,
istart = istart_MNX, nfix = 1L,
cooling = cooling_MNX,
relativeSE = TRUE,
N1 = Nout, N2 = Nout,
Nthin = Nthin, Nbi = Nbi,
formula = formula, family = family,
data = rhizoctonia, weights = Total,
atsample = atsample, corrfcn = corrf,
betm0 = betm0, betQ0 = betQ0,
ssqdf = ssqdf, ssqsc = ssqsc,
dispersion = 1, longlat = FALSE,
nbatch1 = 0.5, nbatch2 = 0.5,
bvmethod = "TukeyHanning",
transf = "mu",
verbose = TRUE)
prop_ENT <- select_proposals_ENT(pargrid = parlist,
istart = istart_ENT, nfix = 1L,
cooling = cooling_ENT,
relativeSE = TRUE,
N1 = Nout,
Nthin = Nthin, Nbi = Nbi,
formula = formula, family = family,
data = rhizoctonia, weights = Total,
atsample = atsample, corrfcn = corrf,
betm0 = betm0, betQ0 = betQ0,
ssqdf = ssqdf, ssqsc = ssqsc,
dispersion = 1, longlat = FALSE,
nbatch1 = 0.5, nbatch2 = 0.5,
bvmethod = "TukeyHanning",
transf = "mu",
verbose = TRUE)
}
Run the code above in your browser using DataLab