Hi Jean
This should do what you want.
sort cases by id date.
compute order=1.
if (lag(id)=id) order=lag(order)+1.
Craig
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
Jean Hanson
Sent: Thursday, November 02, 2006 11:57 AM
To:
[hidden email]
Subject: Computing Ordered Variable
Hello Listserve,
I have a file with multiple records per client. The clients have visits
on different dates and some clients might have only one visit while
others may have six visits. I would like to create a variable that
reflects the ordering of the date variable. For example, visit1 would be
the first/earliest visit for a client, visit2 for the second time a
client was seen. etc. Does anyone have syntax that would help me with
this? Thank you.
Jean Hanson