Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: RE: st merge

From   Bo MacInnis <>
Subject   Re: st: RE: st merge
Date   Tue, 12 Mar 2013 15:22:34 -0700


The Stata command you want to use is _ joinby _, not _merge_.

Consider year and countryname are the variables for year and country name in both your panel file and your country macro indicators file, you could use
use panel_file
joinby year countryname using country_macro_indicators_file

Please do take a look at options for _joinby_, especially in handling unmatched cases.


On 3/12/2013 12:12 PM, Sarah Edgington wrote:
You don't give any indication of what you've tried and what the results
There also isn't a lot of information here about the nature of the data, but
it appears to me that you just want to merge the two data sources by country
and year.  Try -help merge- to get more information about the details of the
I'm assuming you have one observation per country per year in each data set.
If that's not the case it may be more complicated.

-----Original Message-----
[] On Behalf Of
Sent: Tuesday, March 12, 2013 11:59 AM
Subject: st: st merge

I am using Stata 10.1 to merge panel data with yearly macroeconomic time

Panel data is annual data  let say  from 2000 -2012 on firms from different

Time series macroeconomic data annual data from 2000-2012 on the different
countries (same for the panel).
What Shall I do?

Ayi Gavriel Ayayi; Ph.D.
Professor of Financial Economics
Editors of AEFR, AFJ, EFR and IJEMS
Département des Sciences de la Gestion
Université du Québec
3351 Boulevard des Forges C.P 500
Trois Rivières, Québec, G9A 5H7 Canada
Some of my recent papers at:[1]
Tel: (1) 819 376-5011 ext 3137

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index