Skip to content

decode

Convert a numeric variable that has attached value labels into a new string variable of those labels. Codes without labels become missing.

When to use

Recover readable string categories from a labeled numeric variable.

Syntax

decode <numvar>, generate(<newvar>)

Options

  • generate(<newvar>): Required. Name of the new string variable to create.

Examples

decode sex_n, generate(sex_str)

See also