In generating censored random normal variate with a fixed mean and
standard deviation is there a way to determine what the mean and
standard deviation should be for the uncensored normal.
For exmaple, if one wants a cenored normal (at 0) with mean 25 and
standard deviation 30, then
-gen yield = max(0, rnormal(25,30))-
will result in a mean too large and standard deviation too small. In
this example values of -rnormal(13.5,43.75)- work, but is there way to
determine what the uncensored mean and standard deviation should be?
clear
set obs 1000000
set seed 123456
gen yield1 = max(0, rnormal(25,30))
gen yield2 = max(0, rnormal(13.5,43.75))
sum
Scott
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/