Transformations

See also: Transformations, Record Selection, and Input

Defines transformations of variables or constants. Transformations can involve standard arithmetic, logical, and relational operators along with a broad  range of mathematical, date, and indexing functions as well as IF statements and looping.

A set of transformations consists of a list of semi-colon terminated transformation statements.

There are three types of transformations.

Variable transformations modify existing or create new variables. Once the data have been read, variable transformations are carried out immediately. When variable transformations are defined prior to reading the data, they are executed for each record as it is read.  Variable transformations are the most commonly used type of transformations.

Constant transformations define or modify the values of constants

Iterative transformations modify variables repeatedly as a model is fit or a table is created. In the case of model fitting, iterative transformations are carried out at least once for each record at risk for each iteration. In Cox regression, iterative transformations are carried out for each person at risk at each failure time. In this case, they are more appropriately called time-dependent transformations. In creating event-time tables, time-dependent transformations are often used to define time-dependent variables for categorization.

Related script commands

TRAN

ITRAN

TTRAN

CONSTANT