I'd like to be able to do this for any table.
Thanks.
Try this....a little cumbersome but it works. VAR is the variable you
are using for identifying the duplicates.
* Identify Duplicate Cases.
SORT CASES BY VAR(A) .
MATCH FILES /FILE = * /BY VAR
/LAST = duplicates .
VARIABLE LABELS duplicates 'Duplicate Referrals'
.
VALUE LABELS duplicates 0 'Duplicate Case' 1 'Primary Case'.
VARIABLE LEVEL duplicates (ORDINAL).
FREQUENCIES VARIABLES = duplicates .
EXECUTE.
For other procedures you will have to use the OMS - I think.
Marc
VAR LABELS PrimaryFirst 'Duplicate Referrals'.
If this is not what you are looking for please give more detail about
what table and "title" you are discussing.
Art Kendall
Social Research Consultants
I think she wants to label the output table and not the new
variable..........not sure....
Marc
Art
Have you tried the SUBTITLE command?
In a syntax file
SUBTITLE Duplicate Referrals
will ensure that that label is displatyed at the top of each output,
until tne next SUBTITLE command is encountered.
Or - if you are not into using syntax commands, open the output file
(the viewer window). Then select Page Setup from the File pulldown
menu, click on the Options button and add in whatever title you like
as a page header or footer
SORT CASES BY SS#(A) DateRecd(A) .
MATCH FILES /FILE = * /BY SS#
/FIRST = Duplicate_Referrals /LAST = PrimaryLast.
DO IF (Duplicate_Referrals).
COMPUTE Referral_Number = 1 - PrimaryLast.
ELSE.
COMPUTE Referral_Number = Referral_Number + 1.
END IF.
LEAVE Referral_Number.
FORMAT Referral_Number (f7).
COMPUTE InDupGrp = Referral_Number > 0.
SORT CASES InDupGrp(D).
MATCH FILES /FILE = * /DROP = PrimaryLast InDupGrp.
VARIABLE LABELS Duplicate_Referrals 'Indicator of each first matching
case as'+
' Primary'
Referral_Number 'Duplicate Referrals' .
VALUE LABELS Duplicate_Referrals 0 'Subsequent Referral' 1 'First
Referral'.
VARIABLE LEVEL Duplicate_Referrals (ORDINAL)
/Referral_Number (SCALE).
VALUE LABELS Referral_Number 0 'First & Only' 1 'First' 2 'Second' 3
'Third' 4 'Fourth' 5 'Fifth' 6 'Sixth' 7 'Seventh'.
FREQUENCIES VARIABLES = Duplicate_Referrals Referral_Number .
EXECUTE.
Where it says "Referral_Number" is where I needed to label the output.
It was originally 'Sequential count of matching cases' .
For crosstabs or frequencies I've tried using either TITLE or SUBTITLE
but I can't seem to get it to put it where I want it. This is not such
a big deal because the title is the variables which is understandable.
The title for the following is "ESCounselorName * ESAgency
Crosstabulation". If I wanted to change it, I'm not sure how to do
that. But again, it was the previous one that was more of a problem.
CROSSTABS
/TABLES=ESCounselorName BY ESAgency
/FORMAT= AVALUE TABLES
/CELLS= COUNT
/COUNT ROUND CELL .