LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Jan 2008 14:36:36 -0600
Reply-To:     "Peck, Jon" <peck@spss.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Peck, Jon" <peck@spss.com>
Subject:      Re: How to flag individuals who participated 3 years in
              a row
Comments: To: "Norton, John" <jnorton@spss.com>
In-Reply-To:  A<3440368C27E66D4588AF902A2A9EB8E201A7684E@CHIEMAIL1.spss.com>
Content-Type: text/plain; charset="utf-8"

With slightly recent versions of SPSS, just add the aggregated count back to the original variables. No need to save a separate file and merge.

-Jon Peck

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Norton, John Sent: Thursday, January 17, 2008 1:28 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: [SPSSX-L] How to flag individuals who participated 3 years in a row

Hi Don,

You can aggregate the file (Data .. Aggregate..) on the keys you mentioned, and request that the aggregate function count the number of occurrences. If you select the option to save the aggregated data to an external file, you can then select those case IDs (using Data.. Select Cases [and delete all unselected cases]) which have 3 occurrences. Then you can use that subset of cases as a table lookup to merge with the original data file (Data .. Merge files .. Add variables..) and thereby flag all cases which met your criteria.

HTH,

John Norton SPSS Inc.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Don Asay Sent: Thursday, January 17, 2008 2:12 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: How to flag individuals who participated 3 years in a row

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

===================== 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

===================== 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


Back to: Top of message | Previous page | Main SPSSX-L page