Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: st merge


From   [email protected]
To   [email protected]
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: [email protected]
Some of my recent papers at: http://ssrn.com/author=301328
Tel: (1) 819 376-5011 ext 3137




Bo MacInnis <[email protected]> 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: [email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Tuesday, March 12, 2013 11:59 AM
To: [email protected]
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: [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index