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

st: generating random number with restriction to add to a variable in current dataset


From   Fabio Soares <fvsoares@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: generating random number with restriction to add to a variable in current dataset
Date   Wed, 23 Feb 2005 17:45:14 -0300 (ART)

Dear all,

I want to generate random numbers to add to the linear
index of a probit model (xb) so that I can predict
precisely the 1/0 observed outcomes.
Therefore, for y=1 I want to draw a random number
(vi)from a N~(0,1) so that xb+v>0 and for y=0 I want
to draw a random number (vi) so that xb+v<=0. Any idea
on how I can draw these numbers and add them to the
index in few steps?

Best wishes

Fabio



__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 
*
*   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