Push Array

In Rules Builder, select Push Array option from the Edit > Insert submenu to display the Push Array dialog box. Use the options in this dialog box to add or set one value to an array. For more information concerning arrays, see also the Rules Builder Overview.

An array contains a list of values. It can be numbers like 1, 20, 5. It can contain text that has weights like Hot 100, Cold 0, Ignore -100. It can contain text like Hot, Cold, Ignore. An array may be used with a rule to create "reason codes" for output. For example, a company may want to deny a loan and provide a reason why this loan is denied.

It is useful to use text with weights. The weights are used to determine the array’s minimum and maximum and return the correct text. If a text is stored without weights, the text is pulled out of the array based on the alphabetical order.

Push("COUNTER", "ONE")

Push("COUNTER", "TWO")

Push("COUNTER", "THREE")

Min_Variable = ArrayMin("COUNTER", 1)

; Returns text value of ONE

Max_Variable = ArrayMax("COUNTER", 1)

; Returns text value of TWO. Alphabetical order is ONE THREE TWO

An array may be used to manage the execution of complex rules by creating an array of temporary variables. For more information concerning arrays, see also the Rules Builder Overview.

Element Name Description
Array Name The name of an array that already exists or the name of a new array
Text Value Used for text values. For example, "Hot," "Credit Score under 250," "Red Flag"
Numeric Value Used for numeric values. For example, 1, 100.5, 0.2. Values are fetched from an array based on this value. If a Text Value is not assigned a Numeric Value, Statistica assumes a value starting with 101