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