PROVIDE Project Technical Paper 2005:1
February 2005
Figure 9: Do-file structure of ies2000h.do
ies2000h.do
domworker.do
Creates domworkerh.dta from domworker.dta (household-level version)
homegrown.do
replace.do
Creates homegrownp.dta (“individual-level”) and homegrownh.dta
(household-level) files from homegrown.dta. Do-file homegrown.do
checks for errors (missing values and inconsistencies) and corrects
them. It also calculates implicit prices of home produce. Sub-do-file
replace.do deals with duplicate entries. Sub-do-file hphcdrop.do
drops commercial farmers from the database.
© PROVIDE Project
hphcdrop.do
Opensperson.dta and makes adjustments to race variable. Also adds
labels to various variables and calculates household size and
structure for equivalence scales. Sub-do-file factors.do creates factor
classification for variable factor, while activities.do categorises
workers into the correct industry code. The personwgt.dta file is
merged with personp.dta (created here). A household-level version
personh.dta is also created for future merges.
general.do
Opens the original generalorig.dta and merges it with generalwgt.dta to form
general. dta.
Next ies2000h.do merges general.dta with domworkerhdta (merge1a), homegrownh.dta (merge1b) and
personh,dta (merge1c). The file is saved as ies2000h.dta. Various sub-do-files are now run to clean up the data,
annualise incomes and expenditures, check totals and map incomes and expenditure to the correct categories.
Do-file cleanup.do looks for reporting errors or inconsistencies and corrects them
where possible, appropriate or necessary. Next the weekly or monthly income and
expenditure figures are changed to annual figures in annualise.do. Do-file
totals.do creates control totals for total income and expenditure, and also imputes
missing values of food expenditure and tax expenditure. The control totals are
used later to check estimates of total income or expenditure. Finally, mapexp.do
and mapinc.do maps expenditure and income items in the IES 2000 to the correct
expenditure categories (SIC) or income source categories as they appear in the
SAM. This version of ies2000h.dta is saved. This is the final version of
ies2000h.dta prior to further adjustments made in analysis.do
30