Acts like a sophisticated if; very useful for recoding attributes. It takes an optional expression inside parentheses and then evaluates each of any number of true/false expressions to determine which value to return. This is best done with a couple of examples.
Fathom interprets this by substituting age for ? in each of the expressions, starting at the top, until it finds one that is true. It returns the value to the right of the colon for that expression. So, if age is 45, the value of the entire expression is “mature.”
Here’s another example, one that might be used to recode numeric data from the census into meaningful phrases. Fathom compares the value of eduCode with each of the numbers in parentheses and returns the expression to the right of the first one that matches. If none match, it returns the value of the expression to the right of else.
•To add a test value, position the in an existing test or result value. Press the Insert key (or Ctrl+Enter (Win) Option+Return (Mac)). See Recode with a Switch Statement, Recode Numeric Values to Categories, and Recode Ranges of Numeric Values to Categories.
|