R/parnor.R

"parnor" <-
function(lmom, checklmom=TRUE, ...) {
    para <- rep(NA, 2)
    names(para) <- c("mu", "sigma")
    if(length(lmom$L1) == 0) { # convert to named L-moments
      lmom <- lmorph(lmom)     # nondestructive conversion!
    }
    if(checklmom & ! are.lmom.valid(lmom)) {
      warning("L-moments are invalid")
      return()
    }
    para[1] <- lmom$L1
    para[2] <- lmom$L2*sqrt(pi)
    return(list(type="nor", para=para, source="parnor"))
}

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.