Date: Wed, 26 Jan 2005 17:15:23 -0200
Reply-To: Guilherme Coelho Rabello - MDS <guilherme.rabello@mds.gov.br>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Guilherme Coelho Rabello - MDS <guilherme.rabello@mds.gov.br>
Subject: RES: Syntax
Content-Type: text/plain; charset="iso-8859-1"
Ryan,
try that after your commands (I did not test):
Sort cases by childid (a) admins (d).
If childid not eq lag(childid) admins eq 72.
Guilherme.
-----Mensagem original-----
De: Ryan Mulligan [mailto:rmulligan@regionsix.com]
Enviada em: quarta-feira, 26 de janeiro de 2005 17:14
Para: SPSSX-L@LISTSERV.UGA.EDU
Assunto: Syntax
Dear Group:
I need some more assistance with a syntax. I need the syntax to assign the
number of times that a youth was administered the same survey in
chronicagical order. It needs to assign the last time they were administered
the survey the number 72. For example:
childid Month Year admins
1 3 2004 1
1 4 2004 2
1 5 2004 72
2 1 2005 1
2 2 2005 2
2 3 2005 3
3 4 2005 72
I have with your help came up with:
Sort cases by year(a) month (a) childid (a)
compute admins eq 1.
If childid eq lag(childid) admins eq lag(admins) + 1.
Execute.
This works to assign the admins in correct chronological order, but what it
doesn't do is assign the max admins the value 72. It was once suggested that
aggregate would work, but I have had difficulties matching the max admin
back to the original data set with the rest of the data. Is there an easier
way than aggregate?
Ryan Mulligan
Quality Assurance Evaluation Associate
3801 Harney Street
Omaha, NE 68131
This email is property of Region 6 Behavioral Healthcare. Any information
within this email or attached to this email is considered confidential. This
email is not to be forwarded, copied, or reproduced in any way without the
proper consent of Region 6 Behavioral Healthcare.