Statalist The Stata Listserver


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

Re: st: Question RE: merging files


From   Kyle Hood <[email protected]>
To   [email protected]
Subject   Re: st: Question RE: merging files
Date   Thu, 26 Apr 2007 16:27:17 -0400 (EDT)

The following program should work:

. use person_file
. joinby country using country_file

On Thu, 26 Apr 2007, S J wrote:

Dear all,

I have two files, one is person level, one is county
level. To illustrate:

PERSON LEVEL FILE (person_file.dta):

person  county   age
1       1        20
2       1        34
3       1        17
4       2        16
5       2        23
6       2        45


COUNTY LEVEL FILE (county_file.dta):

county   population
1        15000
2        14089

I would have thought that I could merge these two by
stating (while using person_file.dta as memory):

merge county using county_file.dta

But Stata does not like that.

Sorry if this is a dumb question. I am a total newbie.

Best.

Ferdinand.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
*   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/

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