University of Southern California

ITS Information Technology Services

A division of the Office of the Chief Information Officer

Describe/List: Exploring Your Data

Once your data is in a Stata dataset, whether by data entry using the data editor or imported from another program, the next step is to explore the data. From the File menu, select Open and then select the dataset to open.

There are two commonly used features to explore the characteristics of a set of data. These are the describe command and list command.

Describing Your Dataset

From the Stata menu, select Data, then select Describe data and then Describe data in memory. In the pop-up window that appears, simply click on the OK button to obtain a description of all variables in memory. You may be surprised to find that selecting Describe from the Data menu does not produce descriptive statistics. Rather, it provides a list of the number of observations and variables in the dataset, dataset size, variable names, types and labels. An example is shown below:

=============================================================
Contains data from C:\user\STAT\Stata\internetxls.dta
  obs:           507                          
 vars:            15                    29 Jul 2008 18:31
 size:        81,120 (99.2% of memory free)
-----------------------------------------------------------
              storage  display     value
variable name   type   format      label    variable label
------------------------------------------------------------
age             byte   %8.0g                Age
gender          str1   %9s                  Gender
enrolledmember  str3   %9s                  Enrolledmember
tribe           str23  %23s                 Tribe
email           str1   %9s                  Email
homecomputer    str1   %9s                  HomeComputer
homeinternet    str1   %9s                  HomeInternet
yrseduc         float  %9.0g                YrsEduc
radio           str16  %16s                 Radio
newspaper       str16  %16s                 Newspaper
internet_use    str16  %16s                 Internet_use
two_website     str55  %55s                 Two_website
read_email      str16  %16s                 Read_email
knowbroadb      str1   %9s                  KnowBroadB
broad_access    str1   %9s                  Broad_access
------------------------------------------------------------
 

Listing Your Data

It's a good idea to look at your raw data before beginning any statistical analyses. However, if you have thousands of records (and you would know the number of records by the Describe command you just executed above), you certainly don't want to list all of them. To list the first ten observations in a dataset:
  1. From the Stata menu, select Data,
  2. Select Describe data
  3. Select list data.
  4. In the pop-up window that appears (shown below), select the by/if/in tab.
  5. In the next pop-up window that appears (also shown below), select the by/if/in tab.
  6. Check the box labeled use a range of observations and enter the numbers 1 and 10 in the from and to boxes, then click the OK button.
The result is the listing of the first 10 observations for selected variables of the dataset in the memory, shown at the bottom of this page.

List Data Window

List variables

By/If/In/Window

List data by if in

Listing of the First Ten Records in the Dataset

 list age gender enrolled member tribe in 1/10

     +-----------------------------------------+
     | age   gender   enroll~r           tribe |
     |-----------------------------------------|
  1. |  37        M          N                 |
  2. |  24        M          Y           OMAHA |


  3. |  27        M          Y          ONEIDA |
  4. |  28        M          Y   STANDING ROCK |
  5. |  42        M        Yes             N/A |
     |-----------------------------------------|
  6. |  26        M          N                 |
  7. |  23        M          Y            OTOE |
  8. |  28        F          Y     Spirit Lake |
  9. |  19        M          Y          PEQUOT |
 10. |  12        F          N                 |
     +-----------------------------------------+
 

Last updated:
December 03, 2008

Stata

The use of all USC computing resources is governed by the USC Computing Policies.