Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: appending to a file


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: appending to a file
Date   Mon, 24 Nov 2008 16:49:23 -0000

You shouldn't try. 

First, -reshape- one or the other so that you have two data files with
compatible structure, and then -append-. 

Second, it's not even clear that this is an -append- problem. It sounds
more like -merge- to me. 

Nick 
[email protected] 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of JOHN
ANTONAKIS
Sent: 24 November 2008 16:45
To: [email protected]
Subject: st: appending to a file

I have two files. One in long and one in wide format.

In the long file, I have observations at the group level:

group  x  y
1
1
1
1
2
2
2
2
k


In the wide file, I have data at the group level, including a variable
day:

group day x y
1         1
2         1
3         2
4         2
5         3
k

How can I append the day variable from the wide file to the long file?


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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