Creating New Variables
Index Tutorial Glossary  

The User Defined Variable box allows you to define your own variables that can be added to the Variables box and used along with the variables from the data set. The definition can include other variables, functions from the Function box, numeric and string values, logical and arithmetic operators, and parentheses. The result of the expression in the User Defined Variable box must be numeric. To add a label to the user-defined variable, enter a text of the label in the Label of User Defined Expression box.

Syntax A

Use the following simple syntax if you wish to enter only numeric variables and arithmetic operators in the expression.

NumericVariable1 [ArithmeticOperator NumericVariable2 ...]


Note: Square brackets in syntax diagrams denote optional elements.

Examples Using Syntax A

Syntax B

Use the general syntax model below if you wish to include in the expression pre-defined functions from the Function box. Each function requires an appropriate (logical or numeric) argument. For example, the DummyByCondition() uses a logical condition while the DummyByValues() uses a numeric expression.

[NumericVariable ArithmeticOperator] [FunctionName(Expression)] [ArithmeticOperator...], where

Examples Using Syntax B


Related Topic