How to use the contains function while performing Recode/Subset in TIBCO Statistica?

How to use the contains function while performing Recode/Subset in TIBCO Statistica?

book

Article ID: KB0074406

calendar_today

Updated On:

Products Versions
Spotfire Statistica 10 and higher

Description

How can multiple scenarios be checked for with recode/subset node -  Like all test name starts with 'CT...' or all products that have the word 'Calibration' etc.  need to be recoded/ subset into another spreadsheet?

 

Issue/Introduction

How to use the contains function while performing Recode/Subset ?

Resolution

All spreadsheet functions in Statistica can be used for the recode/subset functionality.

Let us walk through an example: 

1. Consider we need to recode Variable 1 in the below data set. All cases that contain the word "Calibration" are to be re-coded as a valid Test. 

    

2.  Add a Recode/subset node (if using a workspace) or choose Recode/subset from the Data Menu. You can use the Contain's formula to define the condition   as - Include/Exclude If: Contains("[Variable name]", "[String to search]")>0 . In this example : 

      Contains("Test Name", "calibration")>0

  and define the value to be recoded (In this example, we are using "PASS" on match and "FAIL" otherwise)

    

3. Click ok. Run the node in the context of a workspace to see results of the recode/subset