R/elpdLeks.R

Defines functions elpdLeks

Documented in elpdLeks

elpdLeks <-
function(x)
{
    if (!inherits(x,"LLCountsSim"))
        stop("x should be of class LLCountsSim")

    ui <- apply(x,1,function(y) {
        z <- y-max(y)
        log(mean(exp(z)))+max(y)
    })
    return(ui)
}
ClementCalenge/caperpyogm documentation built on Sept. 14, 2021, 4:14 p.m.