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

Re: a guess (Re: st: generate a tscs pseudo-population...)


From   wgould@stata.com (William Gould, Stata)
To   statalist@hsphsun2.harvard.edu
Subject   Re: a guess (Re: st: generate a tscs pseudo-population...)
Date   Tue, 08 Jun 2004 07:59:29 -0500

Yesterday I made a posting to Statalist, in which a snippit of the code 
read

>       . gen x2 = . 
>       . replace x2 = 1 in 1
>       . replace x2 = 
>       . gen x2 = 4 + .2*x2[_n-1] + 2*invnorm(uniform())

Toyoto Iwata <iwata@med.akita-u.ac.jp> is right; the -generate- at the end
makes no sense; it should be

        . replace x2 = 4 + .2*x2[_n-1] + 2*invnorm(uniform()) if x2 ==.
or 
        . replace x2 = 4 + .2*x2[_n-1] + 2*invnorm(uniform()) in 2/l

-- Bill
wgould@stata.com
*
*   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