R/loglikNB2.R

Defines functions `loglikNB2`

`loglikNB2` = 
function(phi, lmu, y){
  iphi = 1/phi

  logL = sum(
  (lgamma(y + iphi) -  lgamma(iphi) - lgamma(y + 1) +  y * lmu)  - 
  (iphi + y) * log(iphi + exp(lmu)) + iphi * log(iphi)
  )
  
  return(logL)
}

Try the rxSeq package in your browser

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

rxSeq documentation built on May 1, 2019, 11:31 p.m.