Expression Builder

Expressions are built in the large textbox. Operations (addition, subtraction, and so on) can be pasted into the expression textbox by clicking the corresponding buttons. The Function list contains functions available in Modeler:

By default, a general list of functions appears, but you can use the drop-down list above the Function list box to display functions of a certain type (for example, date and time functions, numeric functions, logical functions, and so on). Similarly, by default, all fields (and categories within a field) in the stream are listed in the Field list box and can be pasted into the expression by clicking the Insert button after the field is selected. As an example:

  1. Click on the field Education.
  2. Once the field Education is selected, click on the field values button (the button with the numbers one, three, and five):

Notice that at this point we can use any of the values for the field Education if we need to. In our case, we are going to select everybody over the age of 17. To do this:

  1. Close the field values dialog box.
  2. Double-click on the field Age.
  3. Click on the > sign.
  4. Type 17.

Your selection criteria is now specifying that anyone over the age of 17 is to be selected:

  1. Click OK.

Because the Mode is set to Include, we are keeping anyone that meets the selection criteria and removing anyone that does not meet the criteria:

  1. Click OK.

Now let's take a look at the results from the Select node:

  1. Connect the Select node to a Table node.
  2. Run the Table.

Notice that there are 143,532 records in the dataset, instead of the original 199,526 cases. At this point, all the nodes downstream of the Select node will analyze only records that are 18 years of age or older.

If you run the Table node below the Var. File node, you will notice that there are 199,526 records in this table, which are all of the records in the original dataset (not shown). In this case, the selection does not apply because this table is not downstream from the Select node.

To quickly check on the previous command, we will rank the data file by age using a Sort node to ensure that we have selected all of the records of interest.

In this example, we selected records based on one simple criterion, however we could have made the selection criteria as simple or complex as the situation required.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.218.132