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

st: RE: Generating random variates


From   "Steichen, Thomas" <[email protected]>
To   <[email protected]>
Subject   st: RE: Generating random variates
Date   Fri, 23 Aug 2002 10:19:23 -0400

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
 
CONFIDENTIALITY NOTE:  This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information.  If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system.  Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.




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