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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: RE: st merge


From   ayayi@uqtr.ca
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: st merge
Date   Wed, 13 Mar 2013 08:46:32 -0400

Thanks you Bo for your useful help
--
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
E-mail: ayi.ayayi@uqtr.ca
Some of my recent papers at: http://ssrn.com/author=301328
Tel: (1) 819 376-5011 ext 3137




Bo MacInnis <bo@macinnis.org> a écrit :

Ayi,

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.

Bo

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
were.
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
syntax.
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.
-Sarah


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of ayayi@uqtr.ca
Sent: Tuesday, March 12, 2013 11:59 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: st merge

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

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

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
E-mail: ayi.ayayi@uqtr.ca
Some of my recent papers at: http://ssrn.com/author=301328[1]
Tel: (1) 819 376-5011 ext 3137




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/



-------------------------------------------------
Courriel expédié via https://courriel.uqtr.ca


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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