Announcement

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

  • Line graph connecting the mean values of several variables

    Hi Stata Loving People,


    I am stuck on a problem.

    I want to create a graph showing the mean value of the heart rate at 0,5,10, 15, 30 and 45 minutes among the participants of different groups (total 3 groups).

    I was able to create it in excel but I don't know which of the graphics options available in the Stata is most appropriate for this?

    Below is the sample from my data.




    group hr0 hr5 hr10 hr15 hr30 hr45
    1 76 67 68 72 74 68
    1 72 76 67 70 78 78
    2 78 56 66 78 75 72
    1 78 67 68 75 74 75
    1 67 65 70 76 75 74
    1 80 68 69 70 78 74
    3 67 69 68 75 71 75
    1 78 78 68 75 75 74
    3 89 67 69 79 78 76
    2 57 67 69 74 57 71
    1 65 68 68 74 72 72
    1 67 67 70 75 70 73
    1 78 69 78 78 75 65

  • #2
    Code:
    collapse hr*, by(group)
    reshape long hr, i(group) j(minutes)
    twoway (line hr minutes if group==1)(line hr minutes if group==2)(line hr minutes if group==3)

    Comment

    Working...
    X