Nothing
# hilbe.NBR2.F10.1.r
# From Hilbe, Negative Binomial regression, 2nd ed, Cambridge Univ. Press
# Negative binomial regression distributions with
# user specified series of alpha values for a specified mean value
# Figures 10.1 default NB2/Geometric: means at 0.5, 1, 2, 5, 10 and alpha=1
#
obs <- 11
mu <- c(0.5,1,2,5,10)
y <- 0:10
alpha <- 1
amu <- mu*alpha
layout(1)
for (i in 1:length(mu)) {
ynb2 = exp(
y*log(amu[i]/(1+amu[i]))
- (1/alpha)*log(1+amu[i])
+ log( gamma(y +1/alpha) )
- log( gamma(y+1) )
- log( gamma(1/alpha) )
)
if (i==1) {
plot(y, ynb2, col=i, type='l', lty=i)
} else {
lines(y, ynb2, col=i, lty=i)
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.