You don't say what you want to do with the computed results so I've stuck an
EXECUTE in here to force the data pass. My approach is to use the LEAVE
command which doesn't reinitialize a computed value as cases are read.
data list list / id dv1.
begin data
01 10
01 14
01 09
02 05
03 18
03 23
03 16
03 09
04 02
04 31
05 13
end data.
if sysmis(lag(id)) record=1 /* handle first case*/.
if lag(id) eq id record=record+1.
if lag(id) ne id record=1.
leave record.
execute.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
Martin Sherman
Sent: Monday, October 15, 2007 2:09 PM
To:
[hidden email]
Subject: syntax needed for equation
Dear List: I have the following equation that I would like to write a syntax
for. Advice appreciated.
P rep = [1 + (p/1-p)raised to 2/3] raised to -1
martin sherman
>>> Error in line 4 of spssx-l.mailtpl: unknown formatting command <<<
-> .................... <-
>>> Error in line 4 of spssx-l.mailtpl: unknown formatting command <<<
-> .................... <-