Statalist


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

re: st: problems with joinby or merge


From   Kit Baum <[email protected]>
To   [email protected]
Subject   re: st: problems with joinby or merge
Date   Mon, 11 May 2009 12:15:47 -0400

<>	
Lots of MISSING VALUES FOR several of the individulas.
Can someone let me know what Im doing wrong? How can I add variables for each of the individuals?


Look at the data on your merge variable, Governorate, In the indiv dataset it ranges from 1-18. In the area dataset it ranges from 11-35. Obviously with a merge all those individuals with 1-10 values will not be matched. You should ALWAYS examine the _merge variable after a merge and think about what it is telling you. In this case it would identify cases = 1 (only in indiv dataset) and cases = 2 (only in gov. dataset -- potentially not a problem if the individuals only come from part of the country) as well as cases = 3 (merged).

The fact that there are 18 distinct values of Governorate in the area file suggests that you might need to recode the values in the indiv. dataset.

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html



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