Statalist


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

Re: st: data management - sets of two lines into single line observation


From   "Svend Juul" <SJ@SOCI.AU.DK>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: data management - sets of two lines into single line observation
Date   Thu, 8 Nov 2007 13:45:20 +0100

b. water wrote:

stata 8.2,

would appreciate advice on how the following data management
transformation can be undertaken:

at the moment data look like this:

Epid	Att	Ned	Yag	Pallad
Gord	Molb	Nur	Zn
Yes	5	twice	Off	Present
2	3	PRN	no
No	4	no	On	Present
0	1	no	yes
.	.	.	.	.
.	.	.	.
.	.	.	.	.
.	.	.	.
Yes	5	twice	Off	Present
2	3	PRN	no
No	4	no	On	Present
0	1	no	yes

i want to change it so it looks like this:

Epid	Att	Ned	Yag	Pallad	Gord	Molb	Nur	Zn
Yes	5	twice	Off	Present	2	3	PRN	no
No	4	no	On	Present	0	1	no	yes
.
.
.
.
Yes	5	twice	Off	Present	2	3	PRN	no
No	4	no	On	Present	0	1	no	yes

thank you for any advice/help.

bw

---------------------------------------------------------------------

Obviously, this is not a Stata dataset which must be rectangular.

Assuming that this is ASCII data with two lines per observation, 
you can use -infile-. But without knowing more, any specific 
advice is not possible.

Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: sj@soci.au.dk
__________________________________________ 

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