Announcement

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

  • Computing a cumulative score

    Hi,

    I have the following sample of data. I have an indicator of 1 and 0 in once column and I want to compute the sum of consecutive 1s (i.e the cumulative column) for each ID.. How can I do that in stata?
    Click image for larger version

Name:	Capture.JPG
Views:	2
Size:	39.8 KB
ID:	1698418

    Last edited by Danielle leblanc; 23 Jan 2023, 20:59.

  • #2
    Duplicate post. See https://www.statalist.org/forums/for...mulative-score

    Comment

    Working...
    X