|
As others have pointed out (repeatedly), it's extremely useful to post syntax when you are having syntax problems. So, when you say 'restructure', i assume you mean casestovars. But maybe you don't.
So, post your syntax! Furthermore, i think you should also post the code for reading the data.
Gene Maguin
On Mon 02/13/12 9:17 PM , "Buhi, Eric" ebuhi@health.usf.edu sent:
> Hi list mates,
> A colleague and I are having some trouble restructuring a dataset.
> Currently, the data are imported from an ACASI file directly into
> SPSS. Data for each person, which are various assessments (e.g., P1,
> P2, P3), are on individual rows. I would like to "unstuck" the data so
> that each person's assessments are together on a single row (1 row = 1
> case/person). Unfortunately, due to completely missing assessments,
> when I restructure the data, the variables do not line up in the
> appropriate rows. For instance, because the time 4 assessment below is
> missing for Pat, Pat's time 5 assessment lines up with Sam's time 4
> assessment data. Do you know how I can write syntax to fix this issue?
> Stacked dataset
> ID Time other variables
> PatP1010100 00
> PatP201100 101
> PatP301010100
> PatP5010 10101
> SamP10101 000
> SamP201100 10
> SamP3010 1010
> SamP4001 0101
> SamP50101 010
> Restructured dataset
> PatP1010100 00PatP201100 101PatP301010100 PatP5010 10101
> SamP10101 000SamP201100 10SamP3010 1010SamP4001 0101SamP50101 010
> Many thanks in advance!
> -Eric
> Eric R. Buhi, MPH, PhD
>
> Assistant Professor
>
> Department of Community and Family Health
>
> College of Public Health
>
> University of South Florida
>
> 13201 Bruce B. Downs Blvd., MDC 56
>
> Tampa, Florida 33612
>
> Phone: 813-974-5290
> http://health.usf.edu/publichealth/cfh/CRUSH.htm [2]
>
>
> Links:
> ------
> [2] http://health.usf.edu/publichealth/cfh/CRUSH.htm
>
>
=====================
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
|