R/utils.R

Defines functions MOM.genpois

MOM.genpois <- function(data){
  
  m <- mean(data); v <- var(data)
  
  emp.theta <- sqrt(m^3 / v)
  emp.lambda <- 1 - sqrt(m / v)
  
  return(list(
    emp.theta = emp.theta,
    emp.lambda = emp.lambda
  ))
  
}

Try the RNGforGPD package in your browser

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

RNGforGPD documentation built on Nov. 18, 2020, 5:08 p.m.