It is a lot of years
since I used SAS, but try this check it against
the semantic meaning of the variables.
It appears that the code is calculating a dichotomous (logical)
variable evx. where the value is 1 if event is true and timeev is within a specific range and otherwise it is zero.
It is then find the probability of the absolute value of
a z, subtracting that form
one and doubling it.
�
data list list /event (f1) timeev(f2) tfinal(f2)z(f5.2).
begin data
1� 1 5 -3.11
1 -1 5� 2.10
0� 1 1� 1.00
1� 6 5 -2.11
end data.
compute evx =
� 1*(event eq 1 and range(timeev,0,tfinal))+
� 0*(event eq 0 or timeev gt tfinal).
compute evx2 = event eq 1 and range(timeev,0,tfinal).
compute pvalue=2*(1-cdf.norm(abs(z),0,1)).
formats evx evx2(f1) pvalue(f5.3).
frequencies variables= evx pvalue.
list.
Art Kendall
Social Research Consultants
On 11/18/2012 7:22 AM, Hillel Vardi wrote:
Shalom
I am adapting� a sas� macro to spss� and have some difficulty� with
the sas� code, can anyone help me� translate the flowing� code
to� spss
evx� = 1*(event eq� 1 and 0 le� timeev� le� tfinal)+0*(event eq� 0 or
timeev� > tfinal);
and the function
pvalue=2*(1-probnorm(abs(z)));
Hillel Vardi
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Art Kendall
Social Research Consultants