R/llDiff.R

Defines functions llDiff

Documented in llDiff

llDiff <- function(new.ll,old.ll,tolerance) {
iii <- c(is.finite(old.ll),is.finite(new.ll))
jjj <- 1+sum((1:2)*iii)
switch(EXPR=jjj,NA,{stop("Infinite decrease in log likelihood.\n")},Inf,
                 (new.ll - old.ll)/(abs(old.ll) + tolerance))
}

Try the eglhmm package in your browser

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

eglhmm documentation built on May 29, 2024, 1:20 a.m.