Duplicated File Management

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicated File Management

Bill Oglesby
Good Afternoon,

I have a student registration file, which is duplicated by head-count (i.e., cases represent students,
designated by 'SSN', and each case may occur more than once). With respect to the variable 'CT',
which indicates whether or not the course in which the student is enrolled is a career/technical
course, this is marked by either a 0 or 1 (i.e., 'no' or 'yes'). My task is to determine -- based on the
number of CT courses in which a student is enrolled for any given semester -- whether that student
may be classified as a CT student. Put another way, if a student has registered for three courses, one
of which is non-CT (e.g., English 101), and the other two are CT (e.g., aviation courses), then that
student would be considered 'CT'. Consequently, if a student is registered for two English courses
and one aviation course, then he would be considered a non-CT student. As an SPSS novice, I have
struggled with both the interface and syntax to find a way to create a list or file that would list
students by SSN (unduplicated) by CT status. If I could do this, then a simple frequency would let me
determine how many of each student there are. Any ideas? Thanks in advance,

Bill

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Duplicated File Management

Richard Ristow
At 02:55 PM 10/8/2008, Bill Oglesby wrote:

>I have a student registration file, which is duplicated by
>head-count (i.e., cases represent students, designated by 'SSN', and
>each case may occur more than once).
>
>Variable 'CT' indicates whether the course in which the student is
>enrolled is a career/technical course; 0 or 1 (i.e., 'no' or 'yes').

So, you have a record for each course in which a student is enrolled;
more than one record, for any student who's enrolled in more than one course.

>My task is to determine -- based on the number of CT courses in
>which a student is enrolled for any given semester -- whether that
>student may be classified as a CT student. If a student has
>registered for three courses, one of which is non-CT (e.g., English
>101), and the other two are CT (e.g., aviation courses), then that
>student would be considered 'CT'. If a student is registered for two
>English courses and one aviation course, then he would be considered
>a non-CT student.
>
>I have struggled with both the interface and syntax to find a way to
>create a list or file that would list students by SSN (unduplicated)
>by CT status.

This is a classical AGGREGATE problem. If a CT student is one, at
least half of  whose courses are CT courses, then (untested),

AGGREGATE OUTFILE=*
   /BREAK=SSN
   /N_Course 'Total no. of courses registered' = N
   /N_CT     'No. of CT courses registered'    = SUM(CT).

FORMATS N_Course N_CT (F3).

*  The following two statements are not strictly needed ... .
NUMERIC   CT_Stdt  (F2).
VAR LABEL CT_Stdt 'Value 1 indicates a CT student'.

DO IF    N_CT GE (N_Course/2).
.  COMPUTE CT_Stdt = 1.
ELSE.
.  COMPUTE CT_Stdt = 0.
END IF.

*  Then, if you like,                                   ... .

FREQUENCIES CT_Stdt.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Duplicated File Management

Bill Oglesby
In reply to this post by Bill Oglesby
Richard,

That did the trick exactly! Thanks for your help,

Bill

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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