Documenting data

Data sets and variables can be documented with descriptive labels and notes.

Variable, value and data labels
,
label variable urbc "Urbanization in three categories" Attach a label to variable urbc
label define classif1 1 "Very poor" 2 "Poor" 3 "Rich" 4 "Very Rich" Define value label classif1[lblname] a set of values to be attached to a variable
label values gdpc classif1 Attach label set classif1 to variable gdpc
label data "Social indicators for 180 countries in1995"
label listList the currently defined label names
label define classif1 4 "Very rich", modify change current label "Very Rich" to "Very rich"
label define classif1 9 missing, addAdd a value label

Quotes are only needed if labels contains spaces (or apostrophes), e.g. "Very rich", no need for quotes is you used Very_Rich.

Notes
note : Data set from the UNDP Website Attach a note to the date set (several notes can be attached)
note urb : Variable needs to be verified, to many missing values Attach note to a variable (several notes are possibles)
notes Lists all notes
notes urbList notes for variable urb

You have also list notes (notes list), drop notes, replace a note or search notes for a particular string.

Display information on data
describe Data description of the current data set: all variables (variable name, labels, display formats) and information on the dataset
describe urb infmor Descriptive information for specific variables
describe urb infmor, fullnames With long variable names (if defined)
describe using "filename"Data documentation for a dataset stored in an external file (not currently in memory)
codebookFull information on the dataset and variables
codebook, compactCompact information on all variables (with mean, number of valid observations, min/max
codebook pop92-infmor, compactsame, for variables pop92 through infmor
Other useful commands