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/