Much data come with categories coded numerically rather than as words. But when you're doing data analysis with Fathom, you want the categories to be words you can read, not numbers you have to keep translating.
Recoding is done with the switch
function, which is a conditional function that acts like a complicated if-statement.
The collection here has two numerically coded attributes: sex: 1 = "Female", 2 = "Male"; education: 1 = "High School", 2 = "College No Degree", 3 = "College Degree", 4 = "Graduate Work"
1. Add two attributes: sexDecode and edu.
2. Double-click the formula cell for sexDecode to show the editor.
3. Enter this formula:
Tab to move in the switch function. To insert the second option, press Insert, or Ctrl+Enter (Win) z+Option+Enter (Mac).
You should include the "Other" value in the formula so that wrongly entered data and missing values don't get coded as male.
4. Similarly, give edu this formula:
Here are the results, shown in a case table:
You could now clear the recoding formulas and even delete the original attributes.
Key Curriculum Press/Key College Publishing www.keypress.com/fathom |