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

Re: st: RE: Generating random variates


From   anirban basu <[email protected]>
To   [email protected]
Subject   Re: st: RE: Generating random variates
Date   Fri, 23 Aug 2002 11:27:38 -0500 (CDT)

Hi all,

Thanks to Thomas for pointing out to the sg44.1 package. I did update the
package from the proper website. Though I ws looking to use my own random
numbers, these ado files are useful because I can modify them to use my
own rnd #s quite easily. 

However,  out of the many distributions covered by this package, I did not
find one for negative binomial. I was wondering if anyone has any code to
generate this distribution. Thanks,

Anirban


______________________________________
ANIRBAN BASU
Doctoral Student
Harris School of Public Policy Studies
University of Chicago
________________________________________________________________


On Fri, 23 Aug 2002, Steichen, Thomas wrote:

> Roger Harbord writes that there are issues involved in properly
> installing the -rnd- package.  Others have adequately replied to
> the general problem of STB programs not always being updated; 
> I'll not address that further.
> 
> I should apologize, though, for pointing Anirban to the STB 41 
> reference.  Clearly I should have remembered that the latest 
> version was elsewhere, since I stimulated the changes therein.
> 
> Nonetheless, despite Roger's P.S. (below), I still believe that 
> the -rnd- package is the best resource for solving Anirban's problem. 
> 
> > P.S. None of this is in fact relevant to anirban basu's 
> > original query as he explained in his second message that 
> > he wants to use his own random numbers, not the 
> > -rnd- package. I've no ideas on that - sorry anirban.
> 
> Anirban's original message was:
> 
> > I was wondering if there is any easy way to generate random
> > variates for Poisson, Negative Binomial and Inverse Gaussian 
> > distributions where E(y) = mu = exp(xb) in Stata. 
> 
> This is precisely what -rnd- does.  The only issue might be that
> -rnd- generates a new dataset of a specified size containing the
> random variates.  As far as I know, there are not functions 
> available to generate individual random variates. If Anirban 
> requires a _single_ random variate (rather than a dataset of 
> random variates), his only recourse is to modify the -rnd- code 
> to generate the single variate, stuff it into a returned value, 
> and pick it up in his own program.   
> 
> Tom
>  
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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