Re: Distinct counts in enrollment data

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Distinct counts in enrollment data

Melissa Ives
Have you tried aggregate using two break variables--ID and Visit_Date?

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Khaleel Hussaini
Sent: Friday, February 15, 2008 1:24 PM
To: [hidden email]
Subject: [SPSSX-L] Distinct counts in enrollment data

Dear Listers,
     I seem to frequently encounter this problem and I need a solution
that does not seem to work with either aggregate or identify duplicate
case function in SPSS. The data has many variables but I am concerned
with these two variables. Data is like this

ID    Visit_date
1      15-MAR-2007
1      15-MAR-2007
1      15-MAR-2007
1      20-JUL-2007
2       20-JUL-2007
2       20-JUL-2007
2       31-JUL-2007
2       20-AUG-2007
2       20-AUG-2007
2       20-AUG-2007
2       12-SEP-2007
3       15-MAR-2007

I want to have a new variable that gives me the distinct count for the
new visit in a new variable or variables.

 ID    Visit_date           Visit_date1
1      15-MAR-2007           2
1      15-MAR-2007
1      15-MAR-2007
1      20-JUL-2007
2       20-JUL-2007             4
2       20-JUL-2007
2       31-JUL-2007
2       20-AUG-2007
2       20-AUG-2007
2       20-AUG-2007
2       12-SEP-2007
3       15-MAR-2007            1

Or atleast flag each distinct visit date, which I can sum. Any thoughts.

K.

=====================
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


PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
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