Date: Wed, 9 Jul 2008 10:55:10 -0700
Reply-To: jimjohn <azam.khan@utoronto.ca>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: jimjohn <azam.khan@utoronto.ca>
Subject: Re: Remove ID's with missing month end data
In-Reply-To: <81DD3D591FC845A68084A8B2D088C636@ssw.buffalo.edu>
Content-Type: text/plain; charset=us-ascii
Thanks. I hadn't heard of a Do if block before, but I will look it up in
previous postings. I'm still confused how I would compare the current ID to
the previuos ID though. I tried to lag the ID but since it is a string, the
lag function doesn't work. Is there any way to lag a string variable? Then,
I could compare the ID with the lagged ID and that would tell me if the
current ID equals the previous.
Gene Maguin wrote:
>
> JimJohn,
>
> Yes, that's right. The difference is only valid when it is computed on
> cases
> having the same id. So, how to fix that up? Suppose you embedded the lag
> computation in a Do if block that was executed only if the current record
> and the immediately preceding record had the same id value. This maneuver
> is
> pretty common so I'm sure you have seen it used in previous postings
>
> Gene Maguin
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@LISTSERV.UGA.EDU (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
>
>
--
View this message in context: http://www.nabble.com/Remove-ID%27s-with-missing-month-end-data-tp18362499p18367279.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|