Announcement

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

  • graph bars with erro bars

    hi all,
    I have 45 continuous variables with 500 observations. i have been reading about creating graph bars with error bars (std or SEM) but i am bit overwhelmed by the many propositions from statlist members, which don't seem intuitive for me (just started learning stata). can you please help me with a simple code that will calculate the mean and the SD or SEM, plot bars with SD or SEM or CI.
    i have the simple code below that allows me to graph the mean of some variables (20 observations) but i want to add the SD.

    Code:
    foreach var in bodyfatbmi-chlorideact {
    sum `var'
    graph bar `var'
    }





    thanks in advance

    Stata 15.1 on mac
    Attached Files
    Last edited by abdelilah arredouani; 19 Jan 2019, 05:04.

  • #2
    You may wish to read about - serrbar - command.
    Best regards,

    Marcos

    Comment


    • #3
      Your graph suggests that your variables are, unsurprisingly, on quite different scales (units of measurement and differing level and spread. For 45 variables you need to think about strategy, as 45 variables in one graph won't work and 45 graphs is not an especially good idea either.

      Comment

      Working...
      X