Statalist


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

re: st: problems with joinby or merge


From   Ana Gabriela Guerrero Serdan <ag_guerreroserdan@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   re: st: problems with joinby or merge
Date   Tue, 12 May 2009 02:43:52 -0700 (PDT)

Dear Eva and Kit, 

Indeed my Governorate variable had differnt values in each dataset. I have corrected them and it seems Ok now. 

Indeed if I would have looked carfully at the _merge variable I wouldn't have spent hours figuring out what was the problem. 


I have typed: merge Governorate using dataset2, nokeep

thanks, 

Gaby 




--- On Mon, 5/11/09, Kit Baum <kitbaum@mac.com> wrote:

> From: Kit Baum <kitbaum@mac.com>
> Subject: re: st: problems with joinby or merge
> To: statalist@hsphsun2.harvard.edu
> Date: Monday, May 11, 2009, 11:15 AM
> <>    
> 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/
> 


      

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index