R/D.fn.R

D.fn <-
function(distribution, h) {
    if (distribution == "normal") {
        (h^2)/2
    } else if (distribution == "bernoulli") {
        -1 * log(1-h)
    } else if (distribution == "poisson") {
        h
    } else if (distribution == "exponential") {
        log(h)
    }
}

Try the SPRT package in your browser

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

SPRT documentation built on May 2, 2019, 6:35 a.m.