/************************************************ * Labor Income * * Author(s): Comfort Sumida, Marjorie Pajaron * ************************************************/ /**************************************************************************************************** * Product: Age profiles of labor income * * Data requirements: Individual data employee compensation, entrepreneurial income, retirement pay * * tx19 = individual employee compensation * * tx24 = individual entrepreneurial income * * tx15 = individual retirement pay * * Methodology: Imputed self-employed income using average productivity of wage earners as weights * ****************************************************************************************************/ /**************************************************************************** * note(s): - do-files are for all years (loops) * * - estimated age profiles are not adjusted to aggregate controls * ****************************************************************************/ # delimit ; set more off; forval i = 1999(1)2005 {; log using "C:\Marjorie\NTA\Taiwan\Labor Income Components`i'", replace; /* using individual data files, as FIES has income data at the individual level */ use "C:\Marjorie\NTA\Taiwan\Taiwan_Data\inditem_`i'.dta", clear; /* employee compensation (less retirement pay) */ gen YLE = tx19 - tx15; gen YLS = txt24*2/3 recode age (90/max = 90); /*************************************************************************** * 07/2007 - Allocate self-employed income using mean wage of * * wage earners as weights. This serves as average productivity * * as weight. So that even unpaid family workers are given * * imputed self-employed income * **************************************************************************/ /* 1. Create weight for self-employed income using average wage of wage earners ws==2 by age */ gen wage_worker=YLE if ws==2; egen mean_wage_worker=mean(wage_worker), by(age); /* 2. Include unpaid family workers, ws==4, as part of self-employed individuals */ gen self_employed=(ws==1|ws==3|ws==4); /* 3. Sum the wage of wage earners for the household */ replace mean_wage_worker=0 if self_employed~=1; egen hhwage_worker=sum(mean_wage_worker), by(savehhid); /* 4. Sum all the entrepreneurial income of indivdiuals in a household */ egen hh_YLS=sum(tx24), by(savehhid); /* 5. Allocate HH self_employed income (hh_YLS) to self-employed workers in a household using % of mean wage of wage earners (by age) to total household wage of wage earners as weight */ gen share_YLS=(mean_wage_worker/hhwage_worker)*hh_YLS; recode share_YLS .=0; replace share_YLS=share_YLS*2/3; /* 6. Tabulate self_employed income per individual using imputed YLS & old way */ gen mult_new=mult; recast int mult_new, force; table age [w=mult_new], c(mean share_YLS); table age [w=mult_new], c(mean YLS); recode share_YLS YLE YL (. = 0); save "C:\Marjorie\NTA\Taiwan\Taiwan_Data\YL`i'"; log close; };