Uloading
Uloading
This commit is contained in:
17
Chililabdata/GenLongYInmigration.do
Normal file
17
Chililabdata/GenLongYInmigration.do
Normal file
@@ -0,0 +1,17 @@
|
||||
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 round = year-2004
|
||||
drop if round > 10
|
||||
tostring round, generate(rounds)
|
||||
replace rounds = "0" + rounds if strlen(rounds) ==1
|
||||
gen socialkey = socialgpid+ rounds
|
||||
gen individkey = individid+ rounds
|
||||
drop EID socialgpidGuid rounds eventid observeid
|
||||
duplicates drop individkey, force
|
||||
drop if round < 0
|
||||
save rYImmigration, replace
|
Reference in New Issue
Block a user