|
Hello,
I have a student data set with 3 different terms (06/FA, 07/FA, 08/FA) and I'm trying to identify the number of unduplicated student head count enrolled in each program by term. I'm using student ID as the matching case. I'm also sorting within the matching group by term. For some reason it's not counting unduplicated students by term but by total enrollment. So it's only counting students once for all 3 terms instead of each term. I'm not sure what I'm doing wrong. Please help if you can. This is what I've been using: * Identify Duplicate Cases. SORT CASES BY STC_PERSON_ID(A) STC_REPORTING_TERM(A). MATCH FILES /FILE=* /BY STC_PERSON_ID /FIRST=PrimaryFirst /LAST=PrimaryLast. DO IF (PrimaryFirst). COMPUTE MatchSequence=1-PrimaryLast. ELSE. COMPUTE MatchSequence=MatchSequence+1. END IF. LEAVE MatchSequence. FORMAT MatchSequence (f7). COMPUTE InDupGrp=MatchSequence>0. SORT CASES InDupGrp(D). MATCH FILES /FILE=* /DROP=PrimaryFirst InDupGrp MatchSequence. VARIABLE LABELS PrimaryLast 'Indicator of each last matching case as Primary'. VALUE LABELS PrimaryLast 0 'Duplicate Case' 1 'Primary Case'. VARIABLE LEVEL PrimaryLast (ORDINAL). FREQUENCIES VARIABLES=PrimaryLast. ===================== 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 |
|
I think that you need to add the REPORTING_TERM variable to your BY
statement in MATCH FILES. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Michelle Sent: Friday, February 06, 2009 12:25 PM To: [hidden email] Subject: Unduplicated cases Hello, I have a student data set with 3 different terms (06/FA, 07/FA, 08/FA) and I'm trying to identify the number of unduplicated student head count enrolled in each program by term. I'm using student ID as the matching case. I'm also sorting within the matching group by term. For some reason it's not counting unduplicated students by term but by total enrollment. So it's only counting students once for all 3 terms instead of each term. I'm not sure what I'm doing wrong. Please help if you can. This is what I've been using: * Identify Duplicate Cases. SORT CASES BY STC_PERSON_ID(A) STC_REPORTING_TERM(A). MATCH FILES /FILE=* /BY STC_PERSON_ID /FIRST=PrimaryFirst /LAST=PrimaryLast. DO IF (PrimaryFirst). COMPUTE MatchSequence=1-PrimaryLast. ELSE. COMPUTE MatchSequence=MatchSequence+1. END IF. LEAVE MatchSequence. FORMAT MatchSequence (f7). COMPUTE InDupGrp=MatchSequence>0. SORT CASES InDupGrp(D). MATCH FILES /FILE=* /DROP=PrimaryFirst InDupGrp MatchSequence. VARIABLE LABELS PrimaryLast 'Indicator of each last matching case as Primary'. VALUE LABELS PrimaryLast 0 'Duplicate Case' 1 'Primary Case'. VARIABLE LEVEL PrimaryLast (ORDINAL). FREQUENCIES VARIABLES=PrimaryLast. ===================== 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 ===================== 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 |
|
In reply to this post by subscribe SPSSX-l Anonymous-2
I'm guessing each record in your data represents a student enrolled in a course during a term, and that each course is part of a program. If the records already contain a PROGRAM field, then something like the syntax below will create a dataset in which each record represents a student enrolled in a program during a term. The CROSSTABS at the end will print a table of student count by term by program.
Aggregate /out=*/ break = STC_PERSON_ID PROGRAM STC_REPORTING_TERM / NCourses=N. Crosstabs PROGRAM BY STC_REPORTING_TERM. Jonathan Fry -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Michelle Sent: Friday, February 06, 2009 1:25 PM To: [hidden email] Subject: Unduplicated cases Hello, I have a student data set with 3 different terms (06/FA, 07/FA, 08/FA) and I'm trying to identify the number of unduplicated student head count enrolled in each program by term. I'm using student ID as the matching case. I'm also sorting within the matching group by term. For some reason it's not counting unduplicated students by term but by total enrollment. So it's only counting students once for all 3 terms instead of each term. I'm not sure what I'm doing wrong. Please help if you can. This is what I've been using: * Identify Duplicate Cases. SORT CASES BY STC_PERSON_ID(A) STC_REPORTING_TERM(A). MATCH FILES /FILE=* /BY STC_PERSON_ID /FIRST=PrimaryFirst /LAST=PrimaryLast. DO IF (PrimaryFirst). COMPUTE MatchSequence=1-PrimaryLast. ELSE. COMPUTE MatchSequence=MatchSequence+1. END IF. LEAVE MatchSequence. FORMAT MatchSequence (f7). COMPUTE InDupGrp=MatchSequence>0. SORT CASES InDupGrp(D). MATCH FILES /FILE=* /DROP=PrimaryFirst InDupGrp MatchSequence. VARIABLE LABELS PrimaryLast 'Indicator of each last matching case as Primary'. VALUE LABELS PrimaryLast 0 'Duplicate Case' 1 'Primary Case'. VARIABLE LEVEL PrimaryLast (ORDINAL). FREQUENCIES VARIABLES=PrimaryLast. ===================== 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 ===================== 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 |
| Free forum by Nabble | Edit this page |
