Uloading
Uloading
This commit is contained in:
29
Chililabdata/genUnionRel.do
Normal file
29
Chililabdata/genUnionRel.do
Normal file
@@ -0,0 +1,29 @@
|
||||
clear all
|
||||
set mem 800M
|
||||
cd data
|
||||
use relationship
|
||||
drop if individid == "" | individid == "0"
|
||||
save all_relationship, replace
|
||||
|
||||
use relationship
|
||||
rename individid individid1
|
||||
rename rel_partnerid individid
|
||||
rename individid1 rel_partnerid
|
||||
drop if individid == "" | individid == "0"
|
||||
save m_relationship, replace
|
||||
use all_relationship
|
||||
append using m_relationship
|
||||
drop if length(individid) != 11
|
||||
sort individid rel_episodeid
|
||||
egen max_individid = max(rel_episodeid), by (individid)
|
||||
keep if rel_episodeid == max_individid
|
||||
duplicates drop individid, force
|
||||
drop rel_partneridGuid max_individid rel_episodeid
|
||||
save, replace
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user