Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
IBM SPSS Modeler Essentials

You're reading from  IBM SPSS Modeler Essentials

Product type Book
Published in Dec 2017
Publisher Packt
ISBN-13 9781788291118
Pages 238 pages
Edition 1st Edition
Languages
Authors (2):
Jesus Salcedo Jesus Salcedo
Profile icon Jesus Salcedo
Keith McCormick Keith McCormick
Profile icon Keith McCormick
View More author details

Derive – Flag


Deriving a field as a flag is similar to deriving a field as a formula except that the expression you create will ultimately result in one of two categorical values. One of the most common methods of deriving a field as a flag is to identify whether something of interest has occurred (for example, purchasing a product, visiting a website, and so on). In this example, we will take the Stock_numbers field and collapse it into those people who have an investment and those that do not:

  1. Place a Derive node onto the canvas.
  2. Connect the Stock_numbers node to the new Derive node.
  3. Edit the new Derive node.
  4. Type Investment in the Derive field textbox.
  5. Click Flag on the Derive as drop-down list.
  6. Click the Expression Builder button.
  7. Double-click on Stock_numbers in the Fields list box.
  8. Click the greater than (>) button.
  9. Type 0.
  1. Click OK:

This equation is saying that if someone has a value greater than zero on the field Stock_numbers, the Investment field will be assigned the value T, otherwise...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}