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

st: outfile-ing multiple lines


From   "E. Michael Foster" <[email protected]>
To   [email protected]
Subject   st: outfile-ing multiple lines
Date   Fri, 20 Sep 2002 08:32:26 -0400 (EDT)

** This didn't appear to go through the first--I apologize if this is a
double-posting. **

Hi,
  I need to write out multiple (three) lines of information for a single
record.  Some of the same variables would be repeated across the lines of
raw data.  (In case you're interested, I'm creating a file with multiple
data structures for aML.)

   Basically I need a file that looks like this:
	  id  counter  y1 x1 x2
          id  counter  y2 x1 x3
          id  counter  y3 x1 x4
where counter identifies the different record types.  Currently, the data
are in stata with one record per id.  X2, X3, X4 may not have the same
dimension.

 One option would be to create multiple raw data files and to manually
concatenate them.  I'm doing this now, but it's a bit of a nuisance.  

  Is there a way to do this with -outfile-?

thanks,
Michael Foster 

E. Michael Foster
Health Policy
Penn State


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