Announcement

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

  • Creating clustered bar chart

    Hi!

    I need help creating a bar chart with multiple bars graphed over another variable.

    I have found this command: "webuse citytemp
    graph bar tempjan tempjuly, over(region)", however, it does not work for me as I intend to have the mean of my variable "score" for a specific country from my data set, and on my y-axis, I need 2 bars per each "rank2" variable category, one for the year 2000 and another for the year 2009. When I add these conditions, the command does not appear to work. Besides, I am working with survey data and must add weights to every mean calculated. Can someone advise me on how to proceed?

    I really appreciate any help you can provide.

  • #2
    Your question is not at all clear. To increase the chances of receiving a helpful response, please provide a representative data example and show us an example of the graph you wish to reproduce. Refer to FAQ Advice #12 for details on how to do this.

    Comment


    • #3
      pweights are allowed with graph bar, so that should not be a problem.

      I agree with Andrew Musau that we need more details here. Use any Stata-supplied dataset, or example data that you give; show the command you used and the graph you got; and spell out what "does not work" or "does not appear to work" means.

      Comment

      Working...
      X