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 (February 2012)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 14 Feb 2012 02:17:50 +0000
Reply-To:     "Buhi, Eric" <ebuhi@health.usf.edu>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Buhi, Eric" <ebuhi@health.usf.edu>
Subject:      help restructuring a dataset
Content-Type: multipart/alternative;

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 ebuhi@health.usf.edu<mailto:ebuhi@health.usf.edu> http://health.usf.edu/publichealth/cfh/CRUSH.htm


[text/html]


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