R/sSolver.R

Defines functions sSolver

Documented in sSolver

# Poisson Likelihood

sSolver <- function(z, a, extra) {
    x <- z
    if (is.null(extra$y)) stop("sSolver needs the additional argument y!")
    z <- extra$y
    fobj <- function(x) sum(x-z*log(x))       #target value
    gobj <- function(x) 1-z/x                 #gradient
    options(warn = -1)
    return(fSolver(x,a,list(fobj=fobj,gobj=gobj)))
}

Try the isotone package in your browser

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

isotone documentation built on March 7, 2023, 3:17 p.m.