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 (May 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 30 May 2008 11:15:49 +0200
Reply-To:     Carsten Pauck <carsten.pauck@googlemail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Carsten Pauck <carsten.pauck@googlemail.com>
Subject:      Re: Longitudinal data / data processing
Comments: cc: Jennifer Thompson <jcthompson@gmail.com>
In-Reply-To:  <5914fb5e0805290946q2bc31b4cle69d71dae88a31f1@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hello, another idea is to restructure the dataset. As a result you have one row for every patient (=id): You start with the data: ID DATE SYMA SYMB SYMC 1,00 01-MAY-1998 ,00 1,00 ,00 1,00 01-MAY-1999 1,00 2,00 ,00 1,00 01-MAY-2000 2,00 2,00 3,00 2,00 02-MAY-1998 ,00 ,00 ,00 2,00 02-MAY-1999 2,00 3,00 2,00 3,00 03-MAY-1998 2,00 4,00 2,00 3,00 03-MAY-1999 2,00 2,00 3,00 3,00 03-MAY-2000 1,00 2,00 3,00 3,00 03-MAY-2001 1,00 ,00 ,00 And you restructure the data: Data -> restructure ... which will generate the following syntax: SORT CASES BY id . CASESTOVARS /ID = id /GROUPBY = VARIABLE . Which will transform the data in switching vars to cases.

syma.1 syma.2 syma.3 syma.4 symb.1 etc 1,00 01-MAY-1998 01-MAY-1999 01-MAY-2000 . ,00 1,00 2,00 . 1,00 2,00 2,00 . ,00 ,00 3,00 . 2,00 02-MAY-1998 02-MAY-1999 . . ,00 2,00 . . ,00 3,00 . . ,00 2,00 . . 3,00 03-MAY-1998 03-MAY-1999 03-MAY-2000 03-MAY-2001 2,00 2,00 1,00 1,00 4,00 2,00 2,00 ,00 2,00 3,00 3,00 ,00

Now it is possible to analyse the data in the way you are used to (count, etc ..). Carsten.

2008/5/29 Jennifer Thompson <jcthompson@gmail.com>: > Dear SPSSers, > > I wonder if anyone could suggest a solution to this data processing / > manipulation problem? > > *Background and description of data* > I am working on a longitudinal data set that consists of psychiatric > symptoms, coded on a 5-point (0-4) scale. The data set is 'long' with a > separate case for each observation. Participants were interviewed annually > and the number of observations per participant is variable. Each > participant has a unique ID code (combination of letters and digits) and a > date is recorded for each interview. > > *Question* > I would like to know how many participants have had a score of 2 or more > (this being the accepted criterion for the symptom being present) for each > symptom at _any_ of the interviews during the follow up period. > > So, I guess I want to create a new variable (e.g. 'ever_panic') that is > coded '1' if a given symptom (e.g. 'panic') is scored 2 or higher for _any_ > of the interviews with an individual participant. Or alternatively, to > generate an output that lists the ID codes and whether or not the symptom > was present at any time? > > I can only think of tortuously long-winded ways to do this, which is not > ideal because the process will need to be repeated for 30+ items! Can any > suggest a solution? I am using SPSS 14. > > I would be very grateful for any suggestions! Thanks for reading. > > Best wishes, > > Jennifer > > ===================== > 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