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   [email protected] (William Gould, Stata)
To   [email protected]
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 <[email protected]> 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
[email protected]
*
*   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