The codebook command in Stata is useful for initial data exploration. Like tabulate or inspect it provides a quick overview of a dataset, including information on variable type (ie. numeric (byte, int, long, float, double) or string), label, unique values (the number of unique values that a variable could take, for intance number of catergories for categorical variables), missing values, and summary statistics (for numeric values values for mean, standard deviation and percentiles).
Let’s try it out:
sysuse nlsw88, clear
codebook
This will give you a detailed overview of all variables in the nlsw88 dataset. In order to see more information for a specific variable though, it’s as simple as:
codebook age