I'm having trouble representing the results of a -tabulate- into -graph bar-
For example
-tabulate NEET residency
NEET | urban rural informal | Total
---------+---------------------------------+----------
0 | 2,135 3,721 611 | 6,467
1 | 1,179 2,782 488 | 4,449
---------+---------------------------------+----------
Total | 3,314 6,503 1,099 | 10,916
Where NEET is binary for whether the person is "Not in Education, Employment or Training".
How can I create a graph that represent the NEET urban population (1,179) divided by the urban population (3,314)? i.e. from the table above I need the graph bar for urban to show: 1,179/3,314=35.5%?
When I try and represent this tabulation into a graph bar using the following command:
-graph bar (percent) NEET, over(residency) blabel(bar, format(%3.1fc))
The result is a graph where the bar representing the urban population reports 30.4% i.e. 3,314/10,916, which is the total urban population divided by the entire population.
Similarly, when I try:
-graph bar (percent) NEET if NEET==1, over(residency) blabel(bar, format(%3.1fc))
The bar representing the urban population reports 26.5% i.e. 1,179/4,449, which is the total NEET urban population divided by the entire NEET population.
For example
-tabulate NEET residency
NEET | urban rural informal | Total
---------+---------------------------------+----------
0 | 2,135 3,721 611 | 6,467
1 | 1,179 2,782 488 | 4,449
---------+---------------------------------+----------
Total | 3,314 6,503 1,099 | 10,916
Where NEET is binary for whether the person is "Not in Education, Employment or Training".
How can I create a graph that represent the NEET urban population (1,179) divided by the urban population (3,314)? i.e. from the table above I need the graph bar for urban to show: 1,179/3,314=35.5%?
When I try and represent this tabulation into a graph bar using the following command:
-graph bar (percent) NEET, over(residency) blabel(bar, format(%3.1fc))
The result is a graph where the bar representing the urban population reports 30.4% i.e. 3,314/10,916, which is the total urban population divided by the entire population.
Similarly, when I try:
-graph bar (percent) NEET if NEET==1, over(residency) blabel(bar, format(%3.1fc))
The bar representing the urban population reports 26.5% i.e. 1,179/4,449, which is the total NEET urban population divided by the entire NEET population.
Comment