Hello Angela,
There is a function for that namely ABS
-----------------------
Arithmetic Functions
[...]
ABS(arg) Absolute value. ABS(SCALE) is 4.7 when SCALE equals 4.7 or -4.7.
-----------------------
As is written onpage 46 of the SPSS 14.0 Command Syntax Reference.
You invoke it via the menu: Help-->Command Syntax Referenec.
Perhaps you want to stuf it into an other variable so you don't change the original data:
COMPUTE varpos = ABS(varpos_ro_neg).
With regards,
Kees de Boer
________________________________
Ing. C.P.J. (Kees) de Boer
EMGO, VUmc
Free University Medical Centre, Amsterdam, Netherlands
Datamanagement & Systeembeheer
D-451 tel. 020-44 49828
-----Oorspronkelijk bericht-----
Van: SPSSX(r) Discussion [mailto:
[hidden email]]Namens Angela
Murphy
Verzonden: dinsdag 13 november 2007 7:13
Aan:
[hidden email]
Onderwerp: Negative value
Hi All
Is there some way to remove negative signs from a list of values (convert
them to positive) in syntax without having to square and then find the
square root?
Thank you
=====================
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
=====================
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