Date: Thu, 17 Jan 2008 15:11:33 -0500
Reply-To: Don Asay <donald.asay82@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Don Asay <donald.asay82@gmail.com>
Subject: How to flag individuals who participated 3 years in a row
Content-Type: text/plain; charset=ISO-8859-1
I have a dataset with where data was collected over 3 years, some
individuals dropped out some individuals came on, but it seems like the
majority of those that participated in the first year also participated in
the last year. I want to figure out how many people participated in all
three years. Each year for each person is entered as its own record so
person 001 in year 2003 is stored 0012003 person 002 is 0022003 and so on.
The data has the aforementioned unique ID; a respondent ID; and the year
participated.
I tried sorting by year then unique Id then using a lag function to mark all
of the cases with a 1 if the case above has the same ID as the case being
examined. This lets me know if the person has participated before, but
doesn't tell me if they participated in all 3 years. I would like to come up
with a way to mark all of the individual cases if and only if they have
participated in all three years. Any suggestions would be helpful.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|