R/neglogLik.R

Defines functions neglogLik

Documented in neglogLik

neglogLik <- function(params, object, pmap=NULL, SNOWcluster=NULL){
    #   have an arg to subset parameters
    if (is.null(pmap)) object$params <- params
    else object <- pmap(object, params)
    x <- -logLik(object, SNOWcluster)
    if (is.infinite(x) | is.na(x)) return(1e15)
    else return(x)
}

Try the PtProcess package in your browser

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

PtProcess documentation built on May 4, 2021, 1:06 a.m.