R/loglikNB0.R

Defines functions `loglikNB0`

`loglikNB0` = 
function(subi, iphi, lmu, y, index){
  whch = (index == subi)
  yp = y[whch]
  lmup = lmu[whch]
  logL = sum(
  (lgamma(yp + iphi) -  lgamma(iphi) - lgamma(yp + 1) +  yp * lmup)  - 
  (iphi + yp) * log(iphi + exp(lmup)) + 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.