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

st: Merging data


From   Reka Sundaram-Stukel <rsundara@wisc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Merging data
Date   Mon, 31 Mar 2003 17:32:38 -0600

Dear statalist,

I am trying to create a panel dataset and I need to merge several datasets in a particular way but don't know how to. See example below.

I have 2 data sets

1999.dta contains

id income year
1 $ 1999
2 $ 1999
3 $ 1999

2000.dta has the same info.

I want to merge these two datasets to look like

id year income
1 1999 $
1 2000 $
2 1999 $
2 2000 $
3 1999 $
3 2000 $

I would really appreciate any help on this.

Reka

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