I working with a panel data comprising of two rounds- 2005 and 2012. I want to keep the same child in the two rounds who have reported hourly wages. I have been able to identify the eldest child in a household using egen norder = rank(age), by(IDHH) but I am unable to keep the same children who have reported income in both the rounds.
IDHH is the unique household id.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(year SURVEY AGE) str10 IDHH int RELATIONSHIPTOHEAD double HOURLYWAGES 2005 1 28 "095903110" 3 4.3367342949 2005 1 21 "292732171" 3 8.5569849014 2005 1 24 "273005162" 3 12.3392858505 2005 1 21 "020501091" 3 19.7307682037 2005 1 20 "210802091" 3 7.68359375 2005 1 29 "020901120" 3 26.934167862 2005 1 29 "271002071" 3 14.8071432114 2005 1 18 "221503021" 3 8.1409931183 2005 1 20 "291205200" 3 5.8986926079 2005 1 27 "070801040" 3 86.6132431031 2005 1 40 "020101141" 3 11.8384609222 2005 1 28 "100903040" 3 12.9699249268 2005 1 22 "082410090" 3 9.1441440582 2012 2 18 "0910050901" 3 5 2012 2 27 "1917030301" 3 8.3333330154 2012 2 26 "0613060601" 3 37.5 2012 2 17 "0928031501" 3 18.75 2012 2 28 "2310061201" 3 12.5 2012 2 19 "2910071801" 3 25 2012 2 19 "0608021521" 3 25 2012 2 18 "1910020311" 3 10 2012 2 18 "2323030121" 3 12.5 2012 2 30 "2211010311" 3 8.75 2012 2 32 "2919061001" 3 18.75 2012 2 19 "2802010621" 3 16.6666660309 2012 2 28 "2317061801" 3 6.25 2012 2 20 "2208031201" 3 8.75 2012 2 18 "2718050801" 3 18.75 2012 2 20 "1918031301" 3 7.3972601891 2012 2 17 "0512031511" 3 10 end label values SURVEY SURVEY label def SURVEY 1 "IHDS1 1", modify label def SURVEY 2 "IHDS2 2", modify label values RELATIONSHIPTOHEAD RO4 label def RO4 3 "Son/Daughter 3", modify
0 Response to How to identify same child in two rounds of Survey Data?
Post a Comment