Uloading
Uloading
This commit is contained in:
16
Chililabdata/code/GenLongOutmigration.do
Normal file
16
Chililabdata/code/GenLongOutmigration.do
Normal file
@@ -0,0 +1,16 @@
|
||||
clear
|
||||
cd e:\chililabdata\data
|
||||
use outmigration
|
||||
replace out_date=out_date/86400000
|
||||
format out_date %td
|
||||
gen year = year( out_date)
|
||||
gen h = halfyear(out_date)
|
||||
gen round = yh(year,h)-89
|
||||
tostring round, generate(rounds)
|
||||
replace rounds = "0" + rounds if strlen(rounds) ==1
|
||||
gen socialkey = socialgpid+ rounds
|
||||
gen individkey = individid+ rounds
|
||||
drop EID h socialgpidGuid eventid observeid year
|
||||
duplicates drop individkey, force
|
||||
drop if round < 0
|
||||
save rOutmigration, replace
|
Reference in New Issue
Block a user