Signs function

To use this function, choose Calc > Calculator.

Converts negative numbers, zero, and positive numbers to −1, 0, and +1, respectively. You can use the Signs function to code the numbers in a column. This function is useful in macros, formulas, and nonparametric analyses.

Syntax

SIGN(number)

For number, specify the number or column of numbers you want to convert.

Examples

Calculate expression Result
SIGN(452) 1
SIGN(-0.66) −1
SIGN(0) 0

In a different example, you want to code the column Days from expected arrival to early (−1), late (+1), or on time (0). In the Calculator enter the expression: SIGN (C2). Store the results in C3.

C2 C3
Days from expected arrival SIGNS values
−2 −1
−1 −1
3 1
0 0
2 1
−3 −1
0 0
−5 −1
−2 −1
1 1