Recoding group if ANY group member meets a certain criterion

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

njnx
Posts: 1
Joined: Sun Jul 31, 2016 12:43 pm

Recoding group if ANY group member meets a certain criterion

Postby njnx » Sun Jul 31, 2016 1:01 pm

Hi all,

I am using a household survey, where each household has a 'household ID', and each participant also has an individual 'unique ID'.

I would like to create a variable where, if ANY member of the household (so any case within each household ID) has a value for variable x above 3, every member of the household will be marked '0' for my new variable. However, if ALL members of the household have a value of 3 or below, every member of the household should be marked '1' for my new variable.


I'm relatively inexperienced at coding in SPSS, so unfortunately I have no real idea where to start. Since there are thousands of household IDs, the simple methods I usually use are not viable.

If it helps, each household ID is a 5 digit number, and each member ID is the same as the household ID, with an extra two digits (01 thru 99) tacked on at the end. For example: household 10001, with members 1000101, 1000102, etc.


Thank you so much for reading my question!
:) - nj

Who is online

Users browsing this forum: No registered users and 4 guests

cron