R/check-first-chain.R

Defines functions .check_first_chain

# Generated by autofun (0.0.0.9000): do not edit by hand!!!
# Please edit source code in spsann-package/R-autofun/check-first-chain.R
.check_first_chain<-function(...){
expression(if (i == 1) {
  x <- round(n_accept / c(n_pts * schedule$chain.length), 2)
  if (x < schedule$initial.acceptance[1]) {
    cat(
      "\nthe initial temperature is too low: ", round(x * 100, 2),
      "% of acceptance in the 1st Markov chain\n", sep = "")
    break
  } else if (x > schedule$initial.acceptance[2]) {
    cat(
      "\nthe initial temperature is too high: more than ",
      round(schedule$initial.acceptance[2] * 100, 2),
      "% of acceptance in the 1st Markov chain\n", sep = "")
    break
  } else {
    cat(
      "\n", round(x * 100, 2),
      "% of acceptance in the 1st Markov chain\n", sep = "")
  }
})
}
samuel-rosa/spsann documentation built on Nov. 6, 2023, 12:48 p.m.