/***************************** * Private Other * * Author(s): Comfort Sumida * *****************************/ /***************************************************************************************************** * Product: Age profiles of private other, tobacco, alcohol and durables expenditures (CFX, CFR) * * Data requirements: household data on consumption (list below), individual age data * * tx800 = household total consumption * * tx810 = household medical care and sanitation expenditures * * tx835 = household education expenditures * * tx732 = household expenditures on alcoholic beverages * * tx740 = household expenditure on tobacco products * * tx760 = household expenditure on rent and water * * tx765 = household water charges * * Methodology: Regression method for tobacco and alcohol; equivalence scale for others and durables * *****************************************************************************************************/ /****************************************************************************************************************************** * note(s): - do-files are for all years (loops) * * - estimated age profiles are not adjusted to aggregate controls * ******************************************************************************************************************************/ /* alcohol and tobacco consumption */ /* used in allocation of indirect taxes */ # delimit ; set more off; forval i = 1976(1)2003 {; log using "C:\other`i'", replace; /* using individual data sets */ use "C:\mind`i'.dta", clear; sort savehhid; save "C:\temp`i'.dta", replace; /* merging with household data sets */ use "C:\mhh`i'.dta", clear; sort savehhid; merge savehhid using "C:\temp`i'.dta"; tab _merge; drop _merge; /* creating age groups */ gen agegrp = age; recode agegrp (15/19=15) (20/24=20) (25/29=25) (30/34=30) (35/39=35) (40/44=40) (45/49=45) (50/54=50) (55/59=55) (60/64=60) (65/69=65) (70/max=70); sort savehhid; /* generating age groups */ forval j = 15(5)70 {; by savehhid: egen P`j' = sum(agegrp == `j'); }; gen alcohol = tx732; gen tobacco = tx740; recode alcohol tobacco (. = 0); /* regressing household alcohol expenditures by the number of household members in each age group */ reg alcohol P* [w = mult] if rel == 1, robust noconstant; forval k = 15(5)70 {; gen aP`k' = _b[P`k']; gen saP`k'= aP`k' * (agegrp == `k'); }; /* regressing household tobacco expenditures by the number of household members in each age group */ reg tobacco P* [w = mult] if rel == 1, robust noconstant; forval m = 15(5)70 {; gen tP`m' = _b[P`m']; gen stP`m'= tP`m' * (agegrp == `m'); }; egen var1a = rsum(saP*); egen var1t = rsum(stP*); sort savehhid; by savehhid: egen totala = sum(var1a); by savehhid: egen totalt = sum(var1t); gen sharea = var1a/totala; gen sharet = var1t/totalt; recode sharea sharet (. = 0); gen indalc = sharea * alcohol; gen indtob = sharet * tobacco; gen age1 = age; replace age1 = 90 if age >= 90; lowess indalc age1, nograph gen(sindalc) bwidth(0.1); lowess indtob age1, nograph gen(sindtob) bwidth(0.1); /* other consumption less alcohol and tobacco */ /* allocated using equivalence scale */ gen alpha = 1; replace alpha = 0.4 if age < 5; replace alpha = 0.4 + (1 - 0.4)*((age - 4)/(20 - 4)) if age >= 5 & age <= 20; sort savehhid; by savehhid: egen alphah = sum(alpha); gen sharei = alpha/alphah; replace sharei = 0 if sharei == .; gen other = tx800 - tx810 - tx835 - tx760 + tx765 - tx740 - tx732; gen oconsi = sharei * other; gen duri = (tx760 - tx765) * sharei; lowess oconsi age1, nograph gen(soconsi) bwidth(0.1); lowess duri age1, nograph gen(sduri) bwidth(0.1); keep savehhid per age mult indalc indtob sindalc sindtob oconsi duri soconsi sduri; save "C:\cons`i'final.dta", replace; log close; };