R/fmay.R

Defines functions fmay

fmay <-
function(k=0.5,x) {
  nz <- sum(x==0)
  if(nz!=0) {
    cat(nz,"zeroes excluded\n")
    x <- x[x!=0]
  }
  S <- length(x)
  nm <- min(x)
  N <- sum(x)
  fa <- (S-1)*log(1-k)
  y <- exp(fa)*(k*(N-nm) + nm) - nm
}

Try the MLpreemption package in your browser

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

MLpreemption documentation built on Feb. 11, 2021, 5:07 p.m.