Liz's Stata Guide

recode

Alters the coding of a category variable or creates a category variable from a continuous one. It cannot be abbreviated.

Typical Use:
recode varx (1 = 1) (2 = 0) (else = .)   - or -
recode vary (0/5 = 1 "low") (6/10 = 2 "mid") (10/20 = 3 "high"), gen(ylev)

Example

Options

Notes

contact: djiboliz@gmail.com
last modified: 8 May 2007