Statalist


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

st: customised output formats


From   "Daniel Exeter" <[email protected]>
To   <[email protected]>
Subject   st: customised output formats
Date   Wed, 26 Mar 2008 16:37:01 +1300

Hi there 

I have the variables 
Pid, x, y, t, d

For 1000 participants, and there are many observations for each
participant. 

I'm using an archaic program that uses data in the format:

Pid
X,y
X,y
X,y
END
Pid
X,y
X,y
END 

And so on.

I would think that I need to : 

loop through for each pid
  identify the value of pid
  write this value to an outfile

 loop through all observations of current pid
  extract values for x and y
  write x and y values to outfile
 
write "end" into outfile

I tried this logic, but I can't seem to append info to the outfile...
any ideas?

Cheers
Dan


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