help des2
-------------------------------------------------------------------------------

Title

des2 -- Describe current dataset (clickable output)

Syntax

des2 [varlist] [, cmd(cmd) varwidth(#) valwidth(#) ] [: command]

Description

des2 describes the data in memory. The program is very similar to describe, but with clickable output. A click on varname tabulates varname, a click on the value label evokes label list.

If des2 is used as a prefix, any variables command returns in r(varlist) are added to varlist.

Options

cmd(cmd) in its simplest form executes cmd varname, when a variable name is clicked. Default cmd is tabulate. Also see Remarks.

varwidth(#) specifies the width for variable names. Default is to abbreviate variable names to 15 characters. Note that # must be between 14 and 32.

valwidth(#) specifies the width for value label names. Default is to abbreviate value label names to 12 characters. Note that # must be between 11 and 32.

Remarks

Say you would like to see summary statistics for a variable when clicking it, rather than tabulating the variable. You would then type

des2 [varname] , cmd(summarize)

Or, suppose you do not want to see summary statistics, but a two-way tabulation of varname and another variable, say foreign, in the auto dataset, you type

des2 [varname] , cmd(tabulate @ foreign)

If you wanted to also see missing values you would add option missing, so the line reads

des2 [varname] , cmd(tabulate @ foreign , missing)

In both cases @ will be replaced with the clicked varname. The placeholder is added to the end of cmd if you do not specify it. Specifying

des2 [varname] , cmd(summarize)

is equal to

des2 [varname] , cmd(summarize @)

and, in fact, equal to

des2 [varname] , summarize

Whenever you want to specify options with cmd, you must specify cmd(cmd). If no options are needed you may omit cmd() in most cases. In case a prefix (e.g. by) is used with cmd, double quotes are required. Specify cmd("prefix : cmd").

Note that cmd is not checked beforehand, meaning des2 executes cmd as typed.

Examples

. sysuse auto . des2

. des2 : lookfor hour

Acknowledgments

Suggestions from Andreas Franken led to the possibility to use des2 as a prefix.

Author

Daniel Klein, University of Bamberg, klein.daniel.81@gmail.com

Also see

Online: describe, lookfor, ds

if installed: findname