help vardesc

Title

vardesc -- Create a table with variable descriptions.

Syntax

Construct a table with variable names, labels and descrptive statistics.

by by_variables: vardesc
[varlist]
[if] [in]
[, options]

Choice of Statistics
order(items) selection and order of items to print. Items are:

name: name of variable (synonym: nm).

label: variable label (synonym: lbl).

mean: mean(synonym: mn).

median: median (synonym: pct50).

variance: variance.

stddev: standard deviation (synonym: sd).

minimum: minimum.

maximum: maximum.

mode: mode; missing if multiple modes.

nobs: number of nonmissing cases for variable.

nmiss: number of missing cases for variable.

pct#: percentile for #=1 5 10 25 50 75 90 95 99.

values: percent of cases with values specified with values().

values(string) values at which % of cases with that value are listed.

othervalues include % of cases with values not listed in values().

range(string) range of values for computing % of cases with those values.

Styles of Output
style(type) select style for output. Styles are:

basic: standard output.

check: check the data during cleaning.

missing: look for missing data.

names: just names and labels; this option is equivalent to
the option name used without the style( ) option (e.g., vardesc, names).

outliers: percentiles to check for outliers.

range: name, N, values and labels.

Compressing Output and Removing Spaces
squeeze removes extra space; if a column size, truncates, it is not changed.

sqmin(#) is the minimum size of column after squeezing; default 6.

optimize prints the specified statistics in a minimum of space, with each
column being no smaller than the optmin size.

optmin(#) is the minimum size of column after optimizing; default 6.

spacer(#) spacing added between statistics when using squeeze
and optimize, default 1.

maxlength(#) is the maximum line size allowed before length of
label is reduced.

oclabel(#) override columns used for variable label.

ocmax(#) override columns used for maximum.

ocmode(#) override columns used for mode.

ocmean(#) override columns used for mean.

ocmin(#) override columns used for minimum.

ocnobs(#) override columns used for # of observations.

ocname(#) override columns used for variable name.

ocpctile(#) override columns used for percentiles.

ocsd(#) override columns used for standard deviation.

ocvar(#) override columns used for variance.

ocvalues(#) override columns used for percent with given value.

Main
aorder alphabetizes order of variables.

first(var_name) prints this as the first variable.

forcen force printing of nobs for each variable even if same value.

noheader surpresses printing of column headings.

nomiss uses listwise deletion to remove missing data for variables in varlist.

number number each variables.

verbose to print extra information.

Alignment of variable name and label
leftlabel left justify printing of the variable label.

leftname left justify printing of the variable name.

rightlabel right justify printing of the variable label.

rightname right justify printing of the variable name.

Column size and decimal digits
column(#) sets default column width used by mean, minimum, maximum, standard deviation and variance.

clabel(#) sets # columns used for variable label; default 20.

cmax(#) sets # columns used for maximum; default 10.

cmode(#) sets # columns used for mode; default 10.

cmean(#) sets # columns used for mean; default 10.

cmin(#) sets # columns used for minimum; default 10.

cnobs(#) sets # columns used for # of observations; default 6.

cname(#) sets # columns used for variable name; default 12.

cpctile(#) sets # columns used for percentiles; default 10.

csd(#) sets # columns used for standard deviation; default 10.

cvar(#) sets # columns used for variance; default 10.

cvalues(#) sets # columns used for percent with given value; default 6.

decimal(#) sets default # if decimal digits used by mean, minimum, maximum, standard deviation and variance.

dmax(#) sets # decimals used for maximum; default 2.

dmode(#) sets # decimals used for mode; default 2.

dmean(#) sets # decimals used for mean; default 2.

dmin(#) sets # decimals used for minimum; default 2.

dnobs(#) sets # decimals used for # of observations; default 0.

dpctile(#) sets # decimals used for percentiles; default 10.

dsd(#) sets # decimals used for standard deviation; default 2.

dvalues(#) sets # of decimals for percent with given value; default 1.

dvar(#) sets # decimals used for variance; default 2.

minlabel minimize column size for label.

minname minimize column size for name.

Description

vardesc creates a table to describe a set of specified variables. You can change
the order in which items are listed, column widths for each item, and the number
of decimal digits used..

Options

Main

xxx By default :

aaa

bbb

xxx

Acknowledgements

Notes:

If values note in order() but values are listed with values(),
values are listed as last statistics in table.

If all variables have the same number of valid observations, a column with the
sample size is not listed even if you specified nobs as an options for order;
to force the printing of the sample size, use option forcen.

Examples:

. vardesc

Author

J. Scott Long

Indiana University

Departments of Sociology & Statistics

jslong{@}indiana.edu

http://www.indiana.edu/~jslong/