nbrat | R Documentation |
ratio of nb
nbrat(m, n, shape, scale)
m |
tmp |
n |
tmp |
shape |
tmp |
scale |
tmp |
tmp
M A Newton
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function( m, n, shape , scale ) { ## returns the non-logged ratio p(m)/p(n) of Neg binomial masses tmp1 <- lgamma(m+shape)-lgamma(n+shape)+lgamma(n+1)-lgamma(m+1) tmp2 <- (m-n) * ( log(scale) - log(scale+1) ) ratio <- exp( tmp1 + tmp2 ) ratio }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.