US Census Bureau People | Business | Geography | Newsroom | Subjects A to Z | Search@Census
data: (da • ta ) n. a collection of facts from which conclusions may be drawn
   Click Here to LAUNCH
ferret: ( fer' • it ) v. To uncover and to bring to light by searching; to search intensively.
TheDataWeb is a site to support and promote organizational and multi-agency collaborative efforts to enhance the DataFerrett project  
 INSIDE TheDataWeb:

link arrowDataFerrett Home
link arrowWhat is DataFerrett
link arrowDatasets Available


link arrowTheDataWeb home
link arrowWhat is TheDataWeb
link arrowTheDataWebCollaborationSite
link arrowFAQs
link arrowFor more info:
DataFerrett Page

User Guide home  Back  Next

Chapter 10 - Step 2: Ferrett Recode Window

What is a Recode?

A recode is basically a new variable that you create by combining or collapsing the value (answers) categories of an existing variable. For example, making an age variable that has values ranging from 0 to 90 into a variable that has 5 age groups of 20 years each (0-20, 21-40, 41-60, 61-80, 81-90). DataFerrett allows you to define the groups any way that you like.

As another example, say you are interested in some differences between married and unmarried persons. The dataset that you are using has a variable defining marital status as six possible categories like this:

= Married, spouse present

= Married, spouse absent

= Widowed

= Divorced

= Separated

= Never Married

You can create a new variable that regroups these into just 2 categories, married, and not married, by combining values 1 and 2 into the married category and the rest into the not married category.

How to Recode a Variable

To create a recode you must have the variable in your databasket

  • In the databasket Tab, highlight the variable that you want to use as the basis of your new variable. You can only select one variable at a time.
  • Click on the Recode Variable(s) button. This opens the Recode Window.

Recoding a Continuous Range Variable

A continuous range variable is one whose possible values are defined only as a range, each value is not labeled or defined. For example, age and income are often continuous range variables because the possible values are for all ages or all income amounts. Below is the Recode Window for an age (continuous range) variable:

First thing to do is to highlight the Label RECODE 1 and type over it changing the label to something relevant.

Next to begin the recode process, highlight the " 90 " and change it to an age. I picked 17. Then hit the Recode button.

Notice how the list of ages has changed on the right under Label.

Now I've decided to group the rest of the ages to breakdown every 20 years. Type in 20 into the " Subgroups Repeat by: " Now select Recode.

Notice how the Not Elsewhere Classified under Label has changed to include all the individual values into 20 year increments or values.

You can change the Label by highlighting (or double clicking) on the label and change it to read as something relevant to your query. My results are shown below:

This is how the Step 2: DataBasket window looks now. The original variable is still in the databasket as well as our new variable called My Age Recode.

Recoding a Categorical Variable

This allows you to regroup a variable's values from many categories to fewer. A categorical variable is a variable that has distinct categories as possible values, For example, the marital status variable mentioned at the beginning of this chapter which has the values:

  1. = Married, spouse present
  2. = Married, spouse absent
  3. = Widowed
  4. = Divorced
  5. = Separated
  6. = Never Married

The recode window for a categorical variable looks a little different from the window for a continuous range variable.

  1. Type over the text "Recode 2" in the upper left text box to label the variable something intuitive. Married / Not Married will be this recode Name.

  2. Highlight the values 1 and 2.

  3. Select Recode to roll these two values together and it will be set to RecodeValue 1.

  4. Highlight and type over the recode value 1 to say "Married"

  5. Highlight the categories of your variable on the left that you want to regroup into a single category. Highlight multiple categories by clicking and dragging over the categories or by using the Ctrl-click combination.

  6. Click the Recode button. The new values should appear in the list on the right. The left most column is the new value and the "Values" column on the right shows you which values from the original variable are contained in the new value. Type over the new value labels on the right so that the labels are more relevant.
  7. Click the "Ok" button to save the new variable in your databasket. Now when you view your databasket you will see the variable you recoded with the name RecodeX ('X' being a sequential number- 1,2,3 ...) and the label that you gave it.

At this point you will want to Save your DataFerrett Session. This will save your DataBasket. Either select the disk icon at the top of the screen or select File > Save As > and type in a file name. This is advantageous to do for many reasons: you may need to stop working in DataFerrett or you can resume at a later time and update to newly released data.

Back    Next  

Last update: 3/12/10