Hi, I have this data set: 1 parent with 2 children, both children appears on each case. case nr 2 repeat itself three tims for child nr 465. I need to create a variable (counter) which counts the children by the parent-ID. The expected results are dispayed on the right column "wanted counter". Can anyone sujest how to solve it? thanks. obs CASE ID-parent ID-child Wanted counter 1 1 10 111 1 2 1 10 455 2 3 2 10 111 1 4 2 10 455 2 5 2 10 455 2 6 2 10 455 2
... View more