
If there are any string variables I find it helpful to take a quick glance at them by using the following command plus the variable names: If there are any string variables they will be listed in the “results” window. If any are, I will most likely need to change them to numeric. The next thing I like to know about my data is if any of the variables are string variables. The label column will only have information if the programmer took the time to document the data. The first six columns will always have information.
STATA CODEBOOK COMMAND FULL
The first command I use is “ codebook, compact ”.Ī partial snapshot of the results are (click image to see it full size): The following are some of the commands that I have in my template. The next step is to copy the commands from my “variable review template” and paste this into my new do-file “wages”. When looking at a data set for the first time I create a do-file and give it the name of the data set I am going to analyze, such as “wages”.

I gave this do-file the very sophisticated name “variable review template”. To improve my efficiency I have created a template with the commands I need to review my data. So why re-invent the wheel every time you look at a new set of data? It’s known as a do-file because it will tell Stata what commands you want to run (how clever).īecause the do-file editor works just like a word processor you can copy from one do-file and paste into another do-file. The keyboard commands are the same for copying and pasting, Ctrl-C and Ctrl-V.Ī saved document created in the Do-file editor is known as a “do-file”. You could also type the commands in a word processor and then copy and paste them in the Do-file editor. You simply type in the commands you want to run. Using the Do-file editor is as easy as using a word processor. In Stata you will write and then save these commands in the “Do-file Editor”. And I guarantee you that your future self will be very happy with your present self if you take the time to do this. To help you get a good feel for your data you will need to use your software’s command or syntax editor to write a series of code for reviewing your data. This helps you get a feeling for what you will be working with, especially if the data set is small.īut what if your data set contains numerous variables and hundreds or thousands of observations? There is no way you can get warm and fuzzy by browsing through a large data set.
STATA CODEBOOK COMMAND SOFTWARE
Most statistical software packages use a spreadsheet format for viewing the data.
