Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Random Number generator

From   anirban basu <>
To   "'statalist'" <>
Subject   st: Random Number generator
Date   Fri, 11 Oct 2002 16:53:02 -0500 (CDT)

Hi all,

The macro written by Joe Hilbe on generating random variates of a negative
binomial distribution has the sytax of :  rndnblx mu, k(#)  

However, I did not find any documentation about the parametrization of
'k'. Generally the variance of NB is given by mu*(1+ alpha*mu). Here 'k'
does not seem to be equal or even inverse of alpha. 

I ran nbreg on the data generated by the rndnblx. The value of alpha
estimated is quite different than that of the 'k' I specified. For

if I specify k= 0.5, alpha is estimated as around 0.06
if I specyfy k=1, alpha is estimated to be around 0.30...

Does anyone know the parametrization of k in terms of the variance
function of the negative binomial distribution.



Doctoral Student
Harris School of Public Policy Studies
University of Chicago

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index