Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: Multiple labels?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Multiple labels?
Date   Wed, 26 Nov 2003 23:47:39 -0000

If you want a simple copying downwards technique, 
it's documented at 

http://www.stata.com/support/faqs/data/missing.html

e.g. 

gen long order = _n 
bysort id (order) : replace summmig = summmig[_n=1] if mi(summmig) 

Nick 
[email protected] 

[email protected]

> You are right on the complications which arise from the 
> fact that there may 
> be more than one migrant in a household (case of -id- 102 1003).
> However one interesting point is that observations in 
> -summmig- are exactly 
> in the same order as migrants in -idmig-. May this helps 
> for question 1?
> I think the whole problem arise because I use -id- as 
> common identifier when 
> merging the data set containing -summmig- with my master 
> data set, then as 
> it appears from the sample I sent to the list, -summmig-'s 
> observations 
> match systematically with the first individuals in each household, 
> regardless of their migration status.
> Then, I am expecting a way to re-allocate things downward. 
> For instance 
> considering -id- 102 1003, I want the two data points under 
> -summmig- to 
> match with  this household's two migrants who are 
> observations number 10 and 
> 12 of the whole data set.
> By the way your suggestion worked fine for creating 
> dummyinkind and I am 
> considering  re-merging using now both -id- and -idmig- as 
> identifiers if 
> this may help for question 1.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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