Hi all,
Everyone was really helpful on my last post. Currently, I have a dataset that has parents (hhidpn) and children (kidid). I've created a variable (seen below) named "kidcount" that tells me the number of unique children each hhidpn has. I now would like to create a variable that gives each child a child number. In the example, lines 10-16 would have kidnumber = 1 and lines 17-23 would have kidnumber = 2 and so on for each parent. Once a new parent (hhidpn) is reached in the dataset, kidnumer would reset. I am sure this is an easy question so I apologize in advance.
Array
0 Response to How to create a child number indicator?
Post a Comment