R/quagno.R

"quagno" <-
function(f,para,paracheck=TRUE) {
    if(! check.fs(f)) return()
    if(paracheck == TRUE) {
      if(! are.pargno.valid(para)) return()
    }
    XI <- para$para[1]
    A  <- para$para[2]
    K  <- para$para[3]

    Y <- qnorm(f)
    ZERO <- sqrt(.Machine$double.eps) # following Tony Ladson, March 2016
    if(abs(K) > ZERO) Y <- (1 - exp(-K*Y) ) / K # following Tony Ladson, March 2016
    x <- XI+A*Y
    x[f == 0 & K < 0] <- XI+A/K
    x[f == 1 & K > 0] <- XI+A/K
    names(x) <- NULL
    return(x)
}

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.