Announcement

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

  • Group bar chart?

    Hello STATA experts,

    I am struggling a bit to represent the following data graphically. I was wondering if a group bar char was the best, but (as I understand) one can only have numeric values on the axes. However, my key variable that I need to have on the axis is a string variable. Here is the dataset that I have:

    Code:
    rank1    Profession2004    score2004    Profession2005    score2005    difference
    1    Profession 1    29.351    Profession 2    81.948    52.597
    2    Profession x    38.868    Profession Y    83.875    45.007
    3    Profession zz    42.625    Profession uu    86.356    43.731
    Profession2004 and Profession 2005 are string values, while rank1, score2004, score2005 and difference are double.

    The data tells us that an individual has moved from "profession 1" with a score of 29.351 in 2004 to "profession 2" with a score of 81.948 in 2005. The difference is 52.527. In short, the individual has moved to a higher profession. I show the top 3 moves (Rank). I would like to represent this graphically. I tried with a grouped bar chart, but does not work. I appreciate any help. Here is an ideal plot that I am looking for (apologies for the messy handwriting)!




    Appreciate any help!

    Thanks in advance,

    Jason
    Last edited by Jason Cruso; 10 May 2023, 09:08.

  • #2
    Ping!

    Comment


    • #3
      Pong! See https://www.statalist.org/forums/help#adviceextras 1.1 for our policy on bumping.

      How many professions? How many people? Proper data example please.

      Comment

      Working...
      X