Stata Metadata

Stata exposes a rich API for querying internal metadata.


Labels

Variable and value labels are defined using the label command.

label variable foo "yes or no?"
label define yesno 1 "Yes" 0 "No"
label values foo yesno

See here for more options.

Numeric values can be quickly prepended to value labels using the numlabel command.

numlabel foo, add mask("#. ")


Descriptives

display _N    // number of cases
display c(k)  // number of variables


CategoryRicottone

Stata/Metadata (last edited 2023-06-07 18:54:07 by DominicRicottone)