Joseph Nathan Cohen

Department of Sociology, CUNY Queens College, New York, NY

How to Use Stata’s codebook Command

To see more about the “Teaching through YouTube” series.  For more, see this post.

Original Video Description

How to use Stata’s codebook command.

Transcription (Auto-Generated)

Intro in this video I’ll show you how to produce a codebook in Stata data allows Overview users to see an automatically generated code book be careful this is not a substitute for producing a real codebook in a primary data set it can be thought of more like a handy function that you can use to get information on data that has already been coded in this data to create these code books we use the command codebook Codebook Output this is an example of what status codebook output looks like here it gives you the name of the variable the label of the variable describing its contents will be presented here in this part of the codebook we get information on its data type its range and the number of unique values summary statistics of the variable are presented here and this part of the codebook gives us information on how many observations are present or missing this is the syntax Codebook Syntax for creating a codebook the command is codebook space the name of the variable comma and oh four notes in this example I’m asking Stata to produce a codebook for the variable net users if I put nothing Stata will list codebook entries for all variables in the dataset by adding the option no I asked Stata to list notes that are in the dataset let’s Review review to look at an automatically generated code book in Stata we use the syntax codebook space the variable name comma in Oh for more information type help code book in the state of command window