clear #delimit ; set mem 50m; *global path ~; global path C:; use $path\data\china\china1988\income\rurali.dta; replace ami88 = 0 if ami88 == .; replace mpen = 0 if mpen == .; replace tnri88 = 0 if tnri88 == .; replace olci88 = 0 if olci88 == .; replace oci88 = 0 if oci88 == .; gen yami88 = 12 * ami88; gen ympen=12*mpen ; gen tentinc = yami88+tnri88+oci88; gen itme=(it01m+it02m+it03m+it04m+it05m+it06m+it07m+it08m)-(it01e+it02e+it03e+it04e+it05e+it06e+it07e+it08e); gen ryp= ympen+olci88+tentinc+itme; drop tentinc; drop itme; drop yami88; drop ympen; label var ryp "Income from wages pensions and other compensations"; saveold $path\data\china\china1988\income\riincome.dta, replace; clear; use $path\data\china\china1988\income\rhincome.dta; gen avgh = (ry2+ry3+ry4+ry5+ry6+ry7+ry8)/nhh; keep ucode avgh nhh; sort ucode; saveold $path\data\china\china1988\income\rhi.dta, replace; clear; use $path\data\china\china1988\income\riincome.dta; sort ucode; merge ucode using $path\data\china\china1988\income\rhi.dta; drop _merge; gen ry = avgh+ryp; label var ry "Disposable Income"; label define relation1 1 "self" 2 "spouse" 3 "child" 4 "grandchild" 5 "parent" 6 "grandparent" 7 "other relative" 8 "not related" 9 "missing"; label values relation relation1; label define gender1 0 "male" 1 "female" 9 "missing"; label values gender gender1; label define student1 1 "yes" 2 "no" 9 "missing"; label values student student1; label define income881 1 "yes" 2 "no" 9 "missing"; label values income88 income881; label define residenc1 1 "living with head of household (HH)" 2 "not living with HH but in same village" 3 "not living in same village with HH" 9 "missing"; label values residenc residenc1; label define educatio1 1 "college or above" 2 "professional school" 3 "upper middle school" 4 "lower middle school" 5 "primary school graduate" 6 "three years or more of primary school" 7 "one to three years of primary school" 8 "illiterate" 9 "missing"; label values educatio educatio1; label define party1 1 "yes" 2 "no" 9 "missing"; label values party party1; label define minority1 1 "yes" 2 "no" 9 "missing"; label values minority minority1; label define employ1 1 "working" 2 "disabled" 3 "retired" 4 "currently a student" 5 "homemaker" 6 "other" 9 "missing"; label values employ employ1; label define ownsect1 1 "state-owned. operated by center or province" 2 "local state-owned" 3 "co-operative" 4 "private or individually-owned" 5 "Sino-foreign joint venture" 6 "foreign-owned" 7 "farming under household responsibility system" 8 "other" 9 "not currently employed" 99 "missing"; label values ownsect ownsect1; label define emsect1 1 "agriculture" 2 "forestry" 3 "raising livestock" 4 "fishery" 5 "family sideline" 6 "industry" 7 "handicrafts" 8 "trade" 9 "construction" 10 "transport" 11 "catering Õservingfoodå" 12 "other services" 13 "post & telecommunications" 14 "finance, insurance" 15 "culture, education, health" 16 "party, government or social organizations" 99 "missing"; label values emsect emsect1; label define typeem1 1 "official of Party or government office or institution" 2 "technical worker" 3 "leading official of state or collective enterprise" 4 "ordinary cadre of Party or government office or institution" 5 "owner and manager of private or individual enterprise" 6 "township or village cadre" 7 "ordinary worker" 8 "temporary or short-term contract worker" 9 "farmer" 10 "worker in town or township enterprise" 11 "principal official of town or township-operated enterprise" 99 "missing"; label values typeem typeem1; label define sj1 1 "yes" 2 "no" 9 "missing"; label values sj sj1; label define soccc1 1 "state-owned. operated by center or province" 2 "local state-owned" 3 "co-operative" 4 "private or individually-owned" 5 "Sino-foreign joint venture" 6 "foreign-owned" 7 "farming under household responsibility system" 8 "other" 9 "not currently employed" 99 "missing"; label values soccc soccc1; label define sownsect1 1 "agriculture" 2 "forestry" 3 "raising livestock" 4 "fishery" 5 "family sideline" 6 "industry" 7 "handicrafts" 8 "trade" 9 "construction" 10 "transport" 11 "catering [serving food]" 12 "other services" 13 "post & telecommunications" 14 "finance, insurance" 15 "culture, education, health" 16 "party, government or social organizations" 99 "missing"; label values sownsect sownsect1; label define semsect1 1 "official of Party or government office or institution" 2 "technical worker" 3 "leading official of state or collective enterprise" 4 "ordinary cadre of Party or government office or institution" 5 "owner and manager of private or individual enterprise" 6 "township or village cadre" 7 "ordinary worker" 8 "temporary or short-term contract worker" 9 "farmer" 10 "worker in town or township enterprise" 11 "principal official of town or township-operated enterprise" 99 "missing"; label values semsect semsect1; label define retire1 1 "yes" 2 "no" 9 "missing"; label values retire retire1; label define wage1 1 "yes" 2 "no" 9 "missing"; label values wage wage1; label define ink881 1 "yes" 2 "no" 9 "missing"; label values ink88 ink881; label define it01t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it01t it01t1; label define it02t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it02t it02t1; label define it03t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it03t it03t1; label define it04t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it04t it04t1; label define it05t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it05t it05t1; label define it06t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it06t it06t1; label define it07t1 1 "food" 2 "daily use article" 3 "consumer durables" 4 "other" 9 "missing"; label values it07t it07t1; saveold $path\data\china\china1988\income\rii.dta, replace;