IBM 15 User Manual

Page of 270
133
CLEM Language Reference
Functions Reference
The following CLEM functions are available for working with data in IBM® SPSS® Modeler.
You can enter these functions as code in a variety of dialog boxes, such as Derive and Set To
Flag nodes, or you can use the Expression Builder to create valid CLEM expressions without
memorizing function lists or field names.
Function Type
Description
Used to gain insight into field values. For example, the function
is_string returns true for all records whose type is a string.
Used to construct new fields or convert storage type. For example,
the function
to_timestamp converts the selected field to a timestamp.
Used to compare field values to each other or to a specified string.
For example,
<= is used to compare whether the values of two fields
are lesser or equal.
Used to perform logical operations, such as
if, then, else operations.
Used to perform numeric calculations, such as the natural log of
field values.
Used to perform trigonometric calculations, such as the arccosine
of a specified angle.
Return probabilities based on various distributions, such as
probability that a value from Student’s distribution will be less
than a specific value.
Used to manipulate integers as bit patterns.
Used to randomly select items or generate numbers.
Used to perform a wide variety of operations on strings, such as
stripchar, which allows you to remove a specified character.
Used to find strings when the precise spelling is not known; based on
phonetic assumptions about how certain letters are pronounced.
Used to perform a variety of operations on date, time, and timestamp
fields.
Used to gain insight into the record sequence of a data set or perform
operations based on that sequence.
Used to access global values created by a Set Globals node. For
example,
@MEAN is used to refer to the mean average of all values
for a field across the entire data set.
Used to access, flag, and frequently fill user-specified blanks or
system-missing values. For example,
@BLANK(FIELD) is used to
raise a true flag for records where blanks are present.
Used to denote the specific fields under examination. For example,
@FIELD is used when deriving multiple fields.
Conventions in Function Descriptions
The following conventions are used throughout this guide when referring to items in a function.
Convention
Description
BOOL
A Boolean, or flag, such as true or false.
NUMNUM1NUM2
Any number.
REALREAL1REAL2
Any real number, such as
1.234 or –77.01.