R/pdfglo.R

"pdfglo" <-
function(x,para) {
    if(! are.parglo.valid(para)) return()
    XI <- para$para[1]
    A  <- para$para[2]
    K  <- para$para[3]

    Y <- (x - XI)/A
    if(K != 0) {
       ARG <- 1-K*Y
       Y <- suppressWarnings( -log(ARG)/K )
    }
    f <- A^(-1) * exp(-(1-K)*Y) / (1+exp(-Y))^2

    names(f) <- NULL
    f[! is.finite(f)] <- NA
    f[is.na(f)] <- 0 # decision Dec. 2015
    return(f)
}

Try the lmomco package in your browser

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

lmomco documentation built on May 29, 2024, 10:06 a.m.