R/startbernweibull.R

Defines functions startbernweibull

Documented in startbernweibull

startbernweibull <- function(x){
  p <- sum(x>0)/length(x)
  x <- x[x>0]
  m <- mean(log(x))
  v <- var(log(x))
  shape <- 1.2/sqrt(v)
  scale <- exp(m + 0.572/shape)
  start <- list(prob=p,
                shape=shape,
                scale=scale)
  return(start)
}

Try the qmap package in your browser

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

qmap documentation built on April 12, 2025, 1:51 a.m.