Announcement

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

  • Dataviz advice on this graph bar: I feel something is misleading


    Click image for larger version

Name:	test.png
Views:	1
Size:	31.7 KB
ID:	1755034

    Hi,
    I just produced this graph on Stata. I am an amateur in statistics and dataviz, but I clearly sense something doesn't match with my data. Bar 0 is supposed to represent the mean wealth of each "montfi" asset for native individuals. Bar 1 is the same thing, but for immigrants. First, the fact that they are means on top of each other gives the impression that the same sample is used for each montfi, but you may have 100 immigrants owning asset montfi7, 1500 owning montfi1, etc. The same can be said for natives.

    How can I show the wealth gap between immigrants and natives for each montfi asset in a way that takes into account the differences in asset detention? And somehow give an idea of aggregate total wealth between natives and immigrants?

  • #2
    I guess you used graph bar and graph bar defaults to using means. Means are additive in principle. So far, so good.

    One issue is whether your data are complete and zeros are included in the data, i.e. in observations with value 0 on the variable in question. So, if two people have assets A=2, B=1, C=0 and A=0, B=1, C= 2 but the zeros are absent from the data then Stata sees A = {2}, B = {1, 1}, C = {2} and the means will be reported as 2, 1, 2 rather than 1, 1, 1. In short, the means are biased upwards.

    You've not given us a data example but if this is your problem, you may need to apply fillin and then replace missings with zeros.

    More simply, if zeros are reported as missings, then Stata will ignore missings and you get the same problem. See the help for mvencode.

    Comment

    Working...
    X