inspect_2
Data exploration and transformation
Summary statistics for positive, zero, negative, and missing values.
Description
A cross between summarize
and inspect
, inspect_2
gives the frequency of positive, zero, negative, and missing values in a variable, as well as the mean, minimum, and maximum value of a variable within those categories and overall.
Results may be stored in a matrix (or matrices, if varlist
is multiple variables) by specifying matrix name(s) to matrix()
.
Syntax
varlist [if] [weight], [options] inspect_2
Option | Description |
---|---|
matrix(matname) |
Store results in matrix matname. If multiple variables are specified in varlist, a list of matrix names in which to store the results. |
fweight
s and iweight
s are allowed.
Examples
Inspect a single variable
inspect_2 thnetworth
Inspect multiple variables, storing the results in matrices.
matrix(pincp_mat pernp_mat) inspect_2 pincp_adj pernp_adj,