Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: mutiple if statements


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: mutiple if statements
Date   Fri, 29 Jun 2007 13:15:07 +0200

I wrote, answering a question of Rajesh Tharyan:
> How about:
>
> . use file1
> . gen oldfile = 1
> . pctile xq = x, nq(5)
> . pctile yq = y, nq(5)
> . append newfile
> . xtile newxq = X if mi(newfile), cutpoints(xq)
> . xtile newyq = Y if mi(niewfile), cutpoints(yq)
> . replace group = (newxq * 10) + newyq

Please change the two lines

. xtile newxq = X if mi(newfile), cutpoints(xq)
. xtile newyq = Y if mi(niewfile), cutpoints(yq)

to 

. xtile newxq = X if mi(oldfile), cutpoints(xq)
. xtile newyq = Y if mi(oldfile), cutpoints(yq)

-- 
Ulrich Kohler
[email protected]
030/25491-361
*
*   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