Announcement

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

  • How to use the "conindex" command in Stata? When each row of the dataset represents the information of thousands of people

    Hi everyone,
    I have some troubles when using the "conindex" command. Each row of my dataset represents the risk suffered by a group of people. I use the following command to draw concentrated curves:
    Code:
    conindex newrisk, truezero rankvar(lowincom_rate) graph
    or
    Code:
    conindex newrisk [aweight=Population], truezero rankvar(lowincom_rate) graph
    However, it seems that the results is not right, because the "conindex" command seems to regard each row of the dataset as the information of one person. So the X-axis(Rank of lowincom_rate) of concentration curve seems not be sorted by population percentage(As shown in the figure below).
    Click image for larger version

Name:	concentration curve.jpg
Views:	2
Size:	32.3 KB
ID:	1686332


    The dataset format is as follows:
    Click image for larger version

Name:	data format.jpg
Views:	2
Size:	90.5 KB
ID:	1686331


    What could I do? Is there anyone could help me solve this problem. Thanks a lot.
    Yuan Hui
    Last edited by Yuan Hui; 21 Oct 2022, 23:30.

  • #2
    Repeated post. See https://www.statalist.org/forums/for...from-ssc/page2

    If interested, please follow the thread just mentioned.

    Comment

    Working...
    X