Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2023-06-09 14:23:32
Size: 1324
Comment:
Revision 4 as of 2025-10-24 17:17:09
Size: 1315
Comment: Fix link
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The '''`inspect`''' command describes a numeric variable. '''`-inspect-`''' describes a numeric variable.
Line 52: Line 52:
[[https://www.stata.com/manuals/dinspect.pdf||Stata manual for inspect]] [[https://www.stata.com/manuals/dinspect.pdf|Stata manual for -inspect-]]

Stata Inspect

-inspect- describes a numeric variable.


Usage

inspect foo
insepct foo if bar==1
insecpt foo in 1/10

The output includes:

  • The variable label
  • A histogram showing rough distribution of values, as well as minimum and maximum values
  • A count of unique values
  • A crosstabulation of aggregated descriptive statistics: categories of negative, zero, and positive values against categories of integer and non-integer values
  • A count of missing values

As an example:

. webuse auto
(1978 automobile data)

. inspect mpg
mpg:  Mileage (mpg)                     Number of observations
                                     Total    Integers    Nonintegers
       #                  Negative       -           -              -
       #                  Zero           -           -              -
       #                  Positive      74          74              -
   #   #
   #   #   #              Total         74          74              -
   #   #   #   #   .      Missing        -
12                   41                 74
  (21 unique values)


See also

Stata manual for -inspect-


CategoryRicottone

Stata/Inspect (last edited 2025-10-24 17:17:09 by DominicRicottone)