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

Re: st: random number with a specific variance


From   Richard Williams <Richard.A.Williams.5@ND.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: random number with a specific variance
Date   Wed, 02 Jun 2004 13:18:42 -0500

At 07:09 PM 6/2/2004 +0100, R.E. De Hoyos wrote:
Hi,

How can I generate a variable containing random numbers normally distributed
and a variance different from 1 (like -invnorm(uniform())- but with a
variance different from one)?
Use the -drawnorm- command, e.g. something like

drawnorm x, n(100) sds(5)

-corr2data- is another option, if you are bound and determined to have the variance equal some exact value, with no allowance for sampling variability.

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index