help describe dialogs: describe varlist
describe using
-------------------------------------------------------------------------------
Title
[D] describe -- Describe data in memory or in file
Syntax
Describe data in memory
describe [varlist] [, memory_options]
Describe data in file
describe [varlist] using filename [, file_options]
memory_options description
-------------------------------------------------------------------------
simple display only variable names
short display only general information
detail display additional details
fullnames do not abbreviate variable names
numbers display variable number along with name
+ varlist save r(varlist) and r(sortlist) in addition to
usual saved results; programmer's option
-------------------------------------------------------------------------
+ varlist is not shown in the dialog box.
file_options description
-------------------------------------------------------------------------
short display only general information
simple display only variable names
+ varlist save r(varlist) and r(sortlist) in addition to
usual saved results; programmer's option
-------------------------------------------------------------------------
+ varlist is not shown in the dialog box.
Menu
describe
Data > Describe data > Describe data in memory
describe using
Data > Describe data > Describe data in file
Description
describe produces a summary of the dataset in memory or of the data
stored in a Stata-format dataset.
For a compact listing of variable names, use describe, simple.
Options to describe data in memory
simple displays only the variable names in a compact format. simple may
not be combined with other options.
short suppresses the specific information for each variable. Only the
general information (number of observations, number of variables,
size, and sort order) is displayed.
detail includes information on the width of 1 observation, the maximum
number of observations holding the number of variables constant, the
maximum number of variables holding the numbers of observations
constant, the maximum width for 1 observation, and the maximum size
of the dataset.
fullnames specifies that describe display the full names of the
variables. The default is to present an abbreviation when the
variable name is longer than 15 characters. describe using always
shows the full names of the variables, so fullnames may not be
specified with describe using.
numbers specifies that describe present the variable number with the
variable name. If numbers is specified, variable names are
abbreviated when the name is longer than eight characters. The
numbers and fullnames options may not be specified together. numbers
may not be specified with describe using.
The following option is available with describe but is not shown in the
dialog box:
varlist, an option for programmers, specifies that, in addition to the
usual saved results, r(varlist) and r(sortlist) be saved, too.
r(varlist) will contain the names of the variables in the dataset.
r(sortlist) will contain the names of the variables by which the data
are sorted.
Options to describe data in file
short suppresses the specific information for each variable. Only the
general information (number of observations, number of variables,
size, and sort order) is displayed.
simple displays only the variable names in a compact format. simple may
not be combined with other options.
The following option is available with describe but is not shown in the
dialog box:
varlist, an option for programmers, specifies that, in addition to the
usual saved results, r(varlist) and r(sortlist) be saved, too.
r(varlist) will contain the names of the variables in the dataset.
r(sortlist) will contain the names of the variables by which the data
are sorted.
Because Stata/MP and Stata/SE can create truly large datasets, there
might be too many variables in a dataset for their names to be stored
in r(varlist), given the current maximum length of macros, as
determined by set maxvar. Should that occur, describe using will
issue the error message "too many variables", r(103).
Remarks
If describe is typed with no operands, the contents of the dataset
currently in memory are described.
The varlist in the describe using syntax differs from standard Stata
varlists in two ways. First, you cannot abbreviate variable names; that
is, you have to type displacement rather than displ. However, you can
use the wildcard character (~) to indicate abbreviations, e.g., displ~.
Second, you may not refer to a range of variables; specifying age-income
is considered an error.
Examples
---------------------------------------------------------------------------
Setup
. webuse states
Describe dataset in memory
. describe
Describe dataset in memory, displaying full variable names
. describe, fullnames
Describe dataset in memory, suppressing specific information about each
variable
. describe, short
Describe dataset in memory, displaying information about width and
maximums for observations, variables, and size
. describe, detail
---------------------------------------------------------------------------
Setup
. sysuse census
Describe all variables whose names begin with pop* for the dataset in
memory
. describe pop*
Describe the variables state, region, and pop18p for the dataset in
memory
. describe state region pop18p
Describe the states dataset located at the http://www.stata-press.com web
site
. describe using http://www.stata-press.com/data/r11/states
---------------------------------------------------------------------------
Saved results
describe saves the following in r():
Scalars
r(N) number of observations
r(k) number of variables
r(width) width of dataset
r(N_max) maximum number of observations
r(k_max) maximum number of variables
r(widthmax) maximum width of dataset
r(changed) flag indicating data have changed since last saved
Macros
r(varlist) variables in dataset (if varlist specified)
r(sortlist) variables by which data are sorted (if varlist
specified)
Also see
Manual: [D] describe
Help: [D] varmanage, [D] cf, [D] codebook, [D] compare, [D] compress,
[D] ds, [D] format, [D] label, [D] lookfor, [D] notes, [D]
order, [D] rename, [D] sysdescribe