Date: Wed, 18 Feb 2009 14:05:33 -0500
Reply-To: Richard Ristow <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <firstname.lastname@example.org>
Subject: Re: change varying records into one record per individual
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 01:34 PM 2/16/2009, Martin Sherman wrote:
>I have students applying to anywhere from 1 to 111 schools. They
>will have a record for each school they apply to. I have whether the
>school accepted them (0 vs 1-yes) and also whether they attended
>that school (0 vs. 1-yes). I can add up these two variables and come
>up with missing, 0, 1, or 2. Missing being that they did not apply
>to that school. 0 is they applied but was not accepted, 1 if the
>were accepted but did not enroll, and 2 if they were accepted and
>enrolled. I now want to have a single record for each student so
>that I have the students status in regard to all 111 schools.
>Looking across the record I should see missing values, 0's, 1's, and
>only one 2.
You have seen Richard Oliver's and Clive Downs's (correct) advice how
to do this.
My advice is, don't do it. Any record with 111 instance of something
is awkward. And (once more), SPSS is very good at handling multiple
records, far clumsier at handling multiple instances within a record.
The following (though untested) should be a lot easier. Remember that
AGGREGATE *replaces* the active file; make sure the original is
stored safely and accessibly.
If each student has a value of a variable called "StdtID", and the
two 0-1 variables are called "Accepted" and "Attended",
/BREAK = StdtID
/NAppl 'Number of schools applied to' = NU
/NAcc 'Number of schools accepted at' = SUM(Accepted)
/NAttnd 'Number of schools attended' = SUM(Attended).
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
For a list of commands to manage subscriptions, send the command