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

st: generate a positive-valued random variable


From   "Jun Xu" <[email protected]>
To   [email protected]
Subject   st: generate a positive-valued random variable
Date   Fri, 29 Apr 2005 15:17:20 -0500

I am still using Stata 8. I am trying to generate a positive-valued random variable, and I think I should turn to inverse gamma distribution. I am not sure if this is right (with its shape parameter equal to 6):

gen positivevar = invgamma(6, uniform())

I tried searching Stata listserv and FAQ and I might have missed it. But I suggest Stata could post some codes for creating commonly used random variables in its online FAQ section. I think that will be great for a lot of intermediate users.

Jun Xu
Department of Sociology
Indiana University

_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

*
* 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