|Date: ||Wed, 26 Jan 2005 11:13:35 -0800|
|Reply-To: ||Ryan Mulligan <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Ryan Mulligan <firstname.lastname@example.org>|
|Content-Type: ||text/plain; charset="iso-8859-1"|
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.
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?
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.