Statalist


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

st: simple "merge" question


From   [email protected]
To   [email protected]
Subject   st: simple "merge" question
Date   Mon, 9 Mar 2009 13:06:09 +0100 (CET)

Hello,

I have two datasets: the first one, called "country" gives some
characteristics of 221 countries (GDP, population...), the second one,
called "safety", contains 24 countries with the variable "safety public
expenditures"

I want to merge these databases, by keeping all the countries. So I write:
...........
use base_pays\country.dta, clear
sort country
merge country using GFS\safety
sort _merge
......

The problem is that Stata accepts to merge (I have no error message), but
indeed my datasets are not merged: the common countries are repeated two
times, and _merge just takes values 1 and 2. So I really don't know what
to do.

Thank you very much for help

Isabelle

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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