I have a household dataset with the household ID, parents' IDs, and each child's ID. Now, I hope to select one child from each household randomly. What could I do?
The dataset is like this:
hhid pid_m pid_f pid_c1 pid_c2 pid_c3 pid_c4 pid_c5 pid_c6
And I want to select one pid_c* from each family randomly.
PS: some pid_c* are missing values when the family has few children. how could I realize this, taking the missing values into account?
Thank you!
The dataset is like this:
hhid pid_m pid_f pid_c1 pid_c2 pid_c3 pid_c4 pid_c5 pid_c6
And I want to select one pid_c* from each family randomly.
PS: some pid_c* are missing values when the family has few children. how could I realize this, taking the missing values into account?
Thank you!
Comment