R/EMJMCMC2016-method-normprob.R

EMJMCMC2016$methods(
  # norm between probabilities vectors
  normprob = function(p1, p2) {
    nn <- abs(1 - sum((p1 + 0.1) / (p2 + 0.1)) / length(p1))
    if (is.na(nn)) {
      nn <- Inf
    }
    return(nn)
  }
)

Try the EMJMCMC package in your browser

Any scripts or data that you put into this service are public.

EMJMCMC documentation built on June 22, 2024, 11:34 a.m.