Hello everyone,

Currently I'm working with a dataset that contains several waves with various ID's (mothers) and their corresponding children, who also have their own ID's .
Each ID of the mother is matched in one line with the ID of their children.
However, In the dataset also contains mothers who have more than ohne child, so one ID can be potentially matched with several CIDs (As you can see in the example).
Wave ID CID
1 21001 1001
1 21001 1002
To see how many mothers have more than one child (via the CID) in the Dataset, I need a new variable that contains mothers with multiple children.
This command should say (by sense)

"gen children if there is more than one CID hat belongs to the ID"

Hopefully you got my point and can help me figure this out.

Thanks in advance!