Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set the X axis in the DASP package in stata

    I want to use the DASP plug-in in stata and use the Lorenz curve to analyze the fairness of inter-provincial health resources. The vertical axis sets health resources, but how to set the horizontal axis. I want to set them as the cumulative percentage of population, cumulative percentage of geographic area, and economic GDP. Cumulative percentage, how to set it? I even don't quite understand the meaning of ranking variable

    Thank you very much



    Click image for larger version

Name:	DASP.png
Views:	1
Size:	59.7 KB
ID:	1642461

  • #2
    I searched from the forum and DASP_MANUAL, and I followed the example, but I didn’t get the answer.
    Click image for larger version

Name:	lorenz submit.png
Views:	1
Size:	59.6 KB
ID:	1642492


    Click image for larger version

Name:	the related results of lorenz curves.png
Views:	1
Size:	42.0 KB
ID:	1642493


    and the related program as follows:

    clorenz expeq, hsize(size) hgroup(zone) min(0) max(1)

    Comment


    • #3
      I have contacted the maintainer of the DASP package for the above problem, and I look forward to a good solution.
      Now my problem is that I need to draw a lorenz curve when studying the fairness of resource preparation, whether it is using the DASP package or various lorenz-related commands (such as lorenz, clorenz, alorenz. svulorenz, glcurve, inequal, dstat ), The Y-axis is the fairness of my research target (such as a certain resource), but how to transform the X-axis, which will be transformed into the cumulative percentage of population, the cumulative percentage of geographic area, and the cumulative percentage of economy. How to set the variables of the X axis, Both in the menu or in the command options I didn't find the ways to solve the above problems. Can you give me a hand?
      I can calculate the Y-axis and X-axis variables separately, and then use the twoway line command to draw the lorenz curve, but I feel that the efficiency is not as high as the menu or command.
      Any hints or help will be appreciated. Thank you very much and I am looking forward to your reply

      Comment


      • #4
        Take the lorenz command as an example,

        ssc install lorenz, replace
        h lorenz

        sysuse nlsw88
        lorenz estimate wage, over(union)
        lorenz graph, aspectratio(1) overlay
        Click image for larger version

Name:	Graph.jpg
Views:	1
Size:	23.7 KB
ID:	1642541




        I want to replace the cumulative percentage of population on the X-axis with the cumulative percentage of geographic area. If there is a ZONE variable in my variables, it is the area of each region (the cumulative area percentage can also be calculated). How should I operate it?
        I am a newer to the fairness analysis of lorenz curve.
        Looking forward to someone answering this question,Thank you very much.
        Last edited by fu gang; 27 Dec 2021, 15:41.

        Comment


        • #5
          The x-axis will show the cumulative proportion of the population by the variable chosen (wage in the example below) if only one variable is specified. To have the cumulative proportion of another variable specified for the x-axis, the same will have to be provided as required by the package you are using i.e., DASP(DASP Stata Package (ulaval.ca) (or lorenz (ssc install lorenz).

          For example
          Code:
          sysuse nlsw88
          lorenz estimate wage, over(union) graph(overlay) // the x-axis here shows cumulative percentage by wage
          lorenz estimate wage, pvar(ttl_exp) over(union) graph(overlay noci) // the x-axis here shows the cumulative percentage by ttl_exp
          You can replace ttl_exp with any variable of interest in your own dataset to have the x-axis show the cumulative percentage by that specific variable.
          Hope this helps

          Comment


          • #6
            First of all, thank you very much for your reply, you have provided a good idea. But after verification, I feel that your views may need to be considered.
            First, compare the two commands you gave examples to draw graphs separately (as follows):
            sysuse nlsw88 lorenz estimate wage, over(union) graph(overlay) lorenz estimate wage, pvar(ttl_exp) over(union) graph(overlay noci) You think that the X axis of the first command above is the cumulative percentage of the wage variable, and the X axis of the second command is the cumulative percentage of the ttl_exp variabl It meansthe pvar() option is used to select the X-axis variable, but let’s compare Click the graphics from the above two commands
            Click image for larger version

Name:	picture1.png
Views:	1
Size:	60.7 KB
ID:	1642707
            Click image for larger version

Name:	picture2.png
Views:	1
Size:	51.0 KB
ID:	1642708
            We can see that the X-axis label is displayed. The X-axis of the two pictures are population percentages, but the second picture adds sorting according to the ttl_exp variable, that is, the function of the pvar() option is to select the X-axis sorting variable for selection.

            Comment


            • #7

              lorenz estimate wage, over(union) graph(overlay) // the x-axis here shows cumulative percentage by wage And I think the above point of view may also be problematic, because the graph drawn according to the command clearly indicates that the X-axis is population percentage, and the cumulative percentage by wage is reflected on the Y-axis, which is clearly indicated on the graph. And I also have evidence that the variable or variable list between the lorenz estimate and the comma cannot be the X-axis, because I can select several variables, and the X-axis will not show several variables, so the cumulative percentage of the variables should be reflected in On the Y axis. Do a few more pictures to see that the X axis has not changed, or the population percentage, and the Y axis is the corresponding cumulative percentage of change. I think the X-axis should be the population percentage based on the sample size (_n) and the total amount (_N). If each record is not a person, and there are variables such as the number of people, it will be included as a weight. If there is another variable population, Represents a different number of people in each record, population should be used as a weight indicator to participate in the calculation

              Comment


              • #8
                As for how I am asking how to modify the X-axis to geographic area, I think the population percentage is a generalized population percentage. If we arrange the different administrative divisions (regions) vertically in the table in order, the area in it is Broadly speaking, if we add the area variable area as a weight, we should draw a lorenz curve based on the area, rather than a lorenz curve based on the real population.


                Because there is no menu and command to set the X-axis variable, and in the direct calculation, you can see that _n/_N is used to calculate the cumulative population percentage as the X-axis. This is the default for each record as 1 population, but when there is a variable for population count and When the results are different, weights should be included

                I don’t know if my understanding is correct. I also hope that the experts analyzed by lorenz will participate in the discussion and provide more valuable opinions. Thank you Tarun again, thank you everyone who participated in the discussion and provided help, thank you very much.



                Comment

                Working...
                X