Johan Osterberg - Product Engineer

Basic summary commands in Stata

April 13, 2019

Some of the most basic utility commands to summarize, describe and get an overview of your data are

describe 
summarize
tab

When opening a new dataset it’s crucial to get an idea of what kind of data you’re dealing with. The describe command offers basic descriptive information about the nature of the data, such as storage type and labels.

Describe command

The summarize command on the other hand offers number of observations, averages, standard deviations as well as min and max values:

Summarize command

Another useful overview type command is tab, which is used to tabulate a variable, for example to see the distribution of observations. Using the autodata example dataset for example, let’s look at the rep78 variable:

tab rep78

Tab command


Johan Osterberg

Written by Johan Osterberg who lives and works in Gothenburg, Sweden as a developer specialized in e-commerce. Connect with me on Linkedin