⇤ ← Revision 1 as of 2020-01-29 19:47:10
Size: 238
Comment:
|
Size: 911
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
---- == Labeling == === Variable Labels === {{{ label variable VAR "var" }}} === Value Labels === Value labels are defined separately from the actual dataset. {{{ label define LABEL 0 "No" 1 "Yes" label define LABEL 99 "Missing", modify label values VAR LABEL }}} By default, labels cannot be overwritten. The '''add''' option allows new values to be inserted into an existing label. The '''replace''' option allows existing values to be overwritten in an existing label. The '''modify''' option combines both. Numeric values can be added to value labels using the '''numlabel''' command. {{{ numlabel LABEL, add mask("#. ") }}} |
Metadata
Data about data.
Labeling
Variable Labels
label variable VAR "var"
Value Labels
Value labels are defined separately from the actual dataset.
label define LABEL 0 "No" 1 "Yes" label define LABEL 99 "Missing", modify label values VAR LABEL
By default, labels cannot be overwritten. The add option allows new values to be inserted into an existing label. The replace option allows existing values to be overwritten in an existing label. The modify option combines both.
Numeric values can be added to value labels using the numlabel command.
numlabel LABEL, add mask("#. ")
Quick Tips
Stata has a number of interactive tools for examining metadata.
di _N // number of cases di c(k) // number of variables