|
At 09:51 PM 10/15/2006, Martin Sherman wrote:
>I am working on a colleague's data set that is formatted in the old
>main frame format where rows are used for records. Some of the
>subjects have only one row of data (only one session) while all of the
>others have 31 rows of data. Each record or row represents a therapy
>session. I need to transform the records into one big row for each
>subject. I am not sure how I should go about this given the number of
>records vary (either 1 or 31).
It sounds like you don't have a data import problem; that is, you can
read your colleagues data into SPSS all right.
What you want is straightforward VARTOCASES, assuming that there's a
subject ID in every record.
As many (including I, often) have advised, it may not be wise to do it.
That organization has nothing to do with the mainframe. Multiple
records per subject, with one record per incident (office visit,
therapy session, etc.) is called 'long' organization; what you want
(one record per subject, with all incidents in it) is called 'wide'
organization. 'Long' organization works better for many purposes; think
carefully what you want to do with your data, before changing to
'wide'.
|