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

st: RE: RE: outfile-ing multiple lines


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: outfile-ing multiple lines
Date   Fri, 20 Sep 2002 15:05:49 +0100

Second try at code: 
 
. preserve 
. expand 3 
. bysort id counter : replace y1 = y2[1] if _n == 2 
. by id counter : replace y1 = y3[1] if _n == 3 
. by id counter : replace x2 = x3[1] if _n == 2 
. by id counter : replace x2 = x4[1] if _n == 3 
. outfile id counter y1 x1 x2 ... 
. restore 
 
Nick 
n.j.cox@durham.ac.uk 

*
*   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