I will now compute Gini coefficient and
Lorenz curve using the saved data in the DAD format in the file
ineq_HHdata.dad created as shown in my last post.
Compute Gini coefficient with DAD
- I opened the data file: ineq_HHdata.dad. If you check the sample design in the Edit menu, you'll see that the design parameters Stratum, PSU, LSU, and Sampling Weight are there. When I select Gini/S Gini Index from the Inequality menu, the “Configuration of distributions” popup opens. Click OK and the dialog box for configuring the computation opens:
When I select
“income” for Variable of Interest and click the Compute
button, I get the Gini coefficient for income. I do the same for
consump(tion). Now at the graph window I click the Save button
and chose to save as html file. The html file shows:
Draw Lorenz curve with DAD
- I select Curve menu, then Lorenz, and then OK. Now I got to the Lorenze curve dialog box:
I select “income”
for Variable of Interest, and click the Graph button.
First, there is nothing in the graph window.
When I click
“Draw”, the Lorenz curve for income is drawn. To get the
45 degree line I select Properties from the Tool menu,
and tick Draw 45 degree Line,
then
click OK.
I repeat this for consumption
variable and draw both curves in the graph window. Then I add
appropriate legend and title using the Tool/Properties
menu and save the graph as a jpg
file. The final result:
No comments:
Post a Comment