Date: Fri, 18 Apr 1997 20:43:52 GMT
Reply-To: David Nichols <nichols@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: David Nichols <nichols@SPSS.COM>
Organization: SPSS, Inc.
Subject: Re: CREATE command, LEAD function and scratch variables
In article <199704160917.LAA25300@server-m.burda.com>,
Burda Medien Vertrieb Offenburg <brinkma@bmv.burda.com> wrote:
>Hi to everyone,
>
>this morning I tried to create a scratch variable using the Lead
>function available with the Create command. The syntax was this:
>
>Create #leadf1=lead(folge,1).
>
>The accompanying error message read:
>
>>Error # 15655 in column 8. Text: #LFA
>>The name given for a result variable is too long, contains an invalid
>>character, is a reserved word, or is otherwise invalid. This command
>>not executed.
>
>The name and its characters should be okay.
>
>I'm not fully sure, but is it impossible to create scratch variables
>usinge CREATE?
>
>Why isn't the LEAD function available on the COMPUTE command?
>
>If not, is there some workaround since I need the LEAD function? I
>would like to avoid creating new permanent variables like leadf1,
>since I would have to this for 10 variables, leads 1 to 5, and this
>is part of a looping procedure passing over several thousand
>data rows. I am just afraid processing time might surge. I am using
>6.1.3 for WfW 3.11.
I'll leave the questions of why to those more familiar with the area,
and just offer a solution: sort the data in reverse order and use
COMPUTE with LAG, then resort.
--
-----------------------------------------------------------------------------
David Nichols Senior Support Statistician SPSS, Inc.
Phone: (312) 329-3684 Internet: nichols@spss.com Fax: (312) 329-3668
-----------------------------------------------------------------------------
|