I have father's data
id |
household member number |
father's age |
..other father's variables |
parent-child identifier |
|
|
|
|
|
70870323 |
1 |
50 |
|
1 |
80820109 |
3 |
60 |
|
2 |
100650216 |
1 |
46 |
|
1 |
191000221 |
14 |
75 |
|
1 |
250660113 |
3 |
68 |
|
3 |
271480203 |
6 |
79 |
|
1 |
I have child's data
id |
household member number |
age_child |
disability _level_child |
disability_duration_child |
parent-child identifier |
70870323 |
1 |
6 |
2 |
5 year |
1 |
70870323 |
2 |
21 |
3 |
10 year |
1 |
80820109 |
3 |
14 |
4 |
15 year |
2 |
80820109 |
4 |
5 |
4 |
2 year |
2 |
100650216 |
5 |
17 |
2 |
5 year |
1 |
100650216 |
6 |
12 |
4 |
10 year |
1 |
191000221 |
9 |
7 |
3 |
15 year |
1 |
250660113 |
10 |
8 |
4 |
20 year |
3 |
271480203 |
14 |
13 |
2 |
4 year |
1 |
I reshaped wide child's data to merge with father's data
id |
household member number |
age_child1 |
age_child2 |
age_child3 |
age_child4 |
… |
disability _level_child1 |
disability _level_child2 |
disability _level_child3 |
… |
disability_duration_child1 |
disability_duration_child2 |
disability_duration_child3 |
disability_duration_child4 |
parent-child identifier |
70870323 |
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
80820109 |
3 |
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
100650216 |
5 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
191000221 |
9 |
|
|
|
|
|
|
|
|
|
3 |
|
|
|
|
250660113 |
10 |
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
271480203 |
14 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
I merged child's and father's data
id |
household member number |
father's age |
..other father's variables |
parent-child identifier |
age_child1 |
age_child2 |
age_child3 |
age_child4 |
… |
disability _level_child1 |
disability _level_child2 |
disability _level_child3 |
… |
disability_duration_child1 |
disability_duration_child2 |
disability_duration_child3 |
disability_duration_child4 |
parent-child identifier |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
70870323 |
1 |
50 |
|
1 |
|
|
|
|
|
|
|
|
|
3 |
|
|
|
|
|
80820109 |
3 |
60 |
|
2 |
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
100650216 |
1 |
46 |
|
1 |
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
191000221 |
14 |
75 |
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
250660113 |
3 |
68 |
|
3 |
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
271480203 |
6 |
79 |
|
1 |
|
|
|
|
|
|
|
|
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Now, I want to use data of only that child from among multiple children of same ftaher, use only those data for children with highest level of disability. If the disability level of 2 child of same father is same, use data of that child with highest duration of disability of child. Please let me know how may I do so.
0 Response to Use variables of only one child from among many children
Post a Comment