Date: Thu, 10 Jul 2008 00:16:18 -0400
Reply-To: Richard Ristow <wrristow@mindspring.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <wrristow@mindspring.com>
Subject: Re: Remove ID's with missing month end data
In-Reply-To: <18369687.post@talk.nabble.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed
Oh, dear.
At 04:08 PM 7/9/2008, jimjohn wrote:
>ok i just tried "compute laggegd = lag(ID). and here is the error I got:
>
>compute lagged = LAG(ID).
>
>>Error # 4309 in column 1024. Text: (End of Command)
>>Invalid combination of data types in an assignment.
Right. And back Wed, 9 Jul 2008 (10:55:10 -0700) you asked, "Is there
any way to lag a string variable?", i.e. your ID.
And yes, Lag works fine with string variables. I think both Gene and
ViAnn Beadle have told you that.
The problem is that variable 'lagged' is *NOT* a string variable; so,
you get the "Invalid combination of data types." A new variable is a
string variable only if it's declared on a "STRING" statement.
I don't see your stating how long 'ID' is. If it's 11 characters,
this will work:
STRING lagged(A11).
compute lagged = LAG(ID).
And none of this has anything to do with file size.
=====================
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