Using Stata for Survey Data Analysis
Minot
Page 47
We can give an example of the graph command by calculating the proportion
of expenditure spent on
food. After merging the “households.dta” file and the “food expenditure.dta” file, we use the
following commands:
gen foodexp = exp_annu
gen totalexp = pc_t_mo*12*hh_size
gen foodshare = foodexp/totalexp
drop if foodshare > 1
gen lnpce = ln(pc_t_mo)
scatter
foodshare lnpce, by(stratum)
Example 20 shows a scatter plot of the share of expenditure spent on food as a function of per capita
expenditure. The graph shows that as income (or per capita expenditure) rises, the
share spent on
food declines. This relationship is called Engle‟s Law, and it is one of the most universal patterns
found in economics.
Do'stlaringiz bilan baham: