How identify case by “feature” of another case?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How identify case by “feature” of another case?

Jara Kampmann-2
Dear List,

I have a problem with „household“-data. In the data set persons are nested in households (and days are nested in persons). I would like to find those persons in each household that are married or live in a partnership with a person in the same household.
In the data there are three different id-variables (for household; person; day) and ten variables on the relation of persons within one household (categories: 1= myself; 2= wife /husband; 3= partner; 4= daughter/son; 5= sister/brother; 6= mother/father; 7= grandchild; 8=grandmother/grandfather; 9= daughter-in-law/son-in-law; 10= mother-in-law/father-in-law; 11= other relative; 12= other relation (not 1 – 11)). The persons in one household are ordered in the way that person1 is the bread winner and the other persons are ordered ascending according to their date of birth.
The tricky problem is that respondents were only asked to fill the part under the diagonal of the matrix “every household member x every household member”. See data snippet below:
temp.
sel if (idtag=1 & (idhh=1 | idhh=2 | idhh=3 | idhh=4 | idhh=5 | idhh= 6)).
list idhh idpers ph01f1 ph01f2 ph01f3 ph01f4 ph01f5 ph01f6 ph01f7 ph01f8.


line idhh idpers ph01f1 ph01f2 ph01f3 ph01f4 ph01f5 ph01f6 ph01f7 ph01f8

1      1      1      1  99997  99997  99997  99997  99997  99997  99997
2      1      2      4      1  99997  99997  99997  99997  99997  99997
3      2      1      1  99997  99997  99997  99997  99997  99997  99997
4      2      2      3      1  99997  99997  99997  99997  99997  99997
5      4      1      1  99997  99997  99997  99997  99997  99997  99997
6      6      1      1  99997  99997  99997  99997  99997  99997  99997
7      6      2      2      1  99997  99997  99997  99997  99997  99997
8      6      3      4      4      1  99997  99997  99997  99997  99997
9      6      4      11     11     3      1  99997  99997  99997  99997
10     6      5      4      4      5      11     1  99997  99997  99997
11     6      6      4      4      5      11     5      1  99997  99997


Number of cases read:  11    Number of cases listed:  11

In the data above there is one couple: household 6; persons 3 and 4 (line 8 and 9). This fact can be identified by the “3” in variable ph01f3 in line 9 for person 4, but only if looking in the data. I tried several solutions, but in the end it is always just postponing the problem: How do I identify a person by a “feature” of another person?

I hope I could describe the problem at hand accurately. If not, let me know and I try again.

Does anyone of you see a (elegant) solution? Any help is much welcome!

Best,
Jara



Von meinem drahtlosen BlackBerry®-Handheld gesendet

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

RE: How identify case by “feature” of another case?

Rich Ulrich
[snip]
>
> In the data above there is one couple: household 6; persons 3 and 4 (line 8 and 9). This fact can be identified by the “3” in variable ph01f3 in line 9 for person 4, but only if looking in the data. I tried several solutions, but in the end it is always just postponing the problem: How do I identify a person by a “feature” of another person?
>
> I hope I could describe the problem at hand accurately. If not, let me know and I try again.

I do not see the difficulty.



If you do,

SELECT IF   ANY(3, ph01f2 to ph01f8) .


- You pick out the lines where "partner" is the code.

What next?  You can save those lines in a file and match
back to the original, if that is what you want.

Am I missing something?
--
Rich Ulrich


=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD