TSP Functions

These functions can be used in any GENR, FRML, IF, SET, SELECT, or MATRIX command. Include the argument (value, series name, or algebraic expression) in the parentheses(). For additional matrix functions, see the MATRIX command.

LOG()

Natural logarithm

EXP()

Exponential function

ABS()

Absolute value

LOG10()

Log base 10

SQRT()

Square root

SIN()

Sine (argument in radians)

COS()

Cosine (argument in radians)

TAN()

Tangent (argument in radians)

ATAN()

Arctangent (answer in radians)

NORM()

Standard normal density

CNORM()

Standard normal cumulative distribution function

CNORMI()

Inverse of the standard normal cumulative distribution function

LNORM()

Log of normal density

LCNORM()

Log of cumulative normal

DLCNORM()

Derivative of LCNORM = inverse Mills ratio

GAMFN()

Gamma function (not Gamma density)

LGAMFN ()

Log of Gamma function

DLGAMFN()

Derivative of LGAMFN = DIGAMMA()

TRIGAMMA()

Derivative of DIGAMMA() [non-differentiable]

FACT()

Factorial: FACT(X) = X! = GAMFN(X+1)

LFACT()

Log of factorial

SIGN()

Sign: -1 for X<0, 0 for X=0, 1 for X>0 [deriv=0]

POS()

Positive: POS(X) = max(0,X)

Note: "min(A,B)" = B - POS(B-A), "max(A,B)" = A + POS(B-A)

MISS()

Missing: 1 for X missing, 0 otherwise [non-differentiable]

INT()

Integer: truncate (round towards 0) [non-differentiable]

CEIL()

Ceiling: round away from 0 [non-differentiable]

ROUND()

Round to nearest integer (.5 rounds to 1) [non-differentiable]