Announcement

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

  • bar chart comparing subgroup

    Hello,
    I am trying to create a bar chart comparing the percentage of attendance to healthcare between diseased and non-diseased (binary variable). For each participant, there is a record of total attendance in a variable named attendance. I turned attendance into a four level categorical variable (attendance_cat) then I used the following syntaxes:

    seperate attendance_cat, by(disease)
    graph bar attendance_cat0 attendance_cat1 , over(attendance_cat)
    These syntaxes are not achieving the aim. Running them produce bars of equal lengths for diseased and non-diseased, and shows the word "mean"; I am trying to examine percentages of each of diseased and non-diseased across attendance categories (i.e. 0; 1; 2 to 12; +13).

    Your help is much appreciated.

    Danah

Working...
X