missings from the Stata Journal offers a bundle of subcommands.
search dm0085 will yield a clickable link to the latest version of the file.
The write-up in the Stata Journal will emerge from behind a paywall on the publication of Stata Journal 18(4) in December 2018 or January 2019.
Before then, or even after, the examples in the Statalist announcement give much flavour.
Here is a token:
. webuse nlswork, clear
(National Longitudinal Survey. Young Women 14-26 years of age in 1968)
. missings report
Checking missings in all variables:
15082 observations with missing values
age 24
msp 16
nev_mar 16
grade 2
not_smsa 8
c_city 8
south 8
ind_code 341
occ_code 121
union 9296
wks_ue 5704
tenure 433
hours 67
wks_work 703
. missings report, min(1000)
Checking missings in all variables:
15082 observations with missing values
union 9296
wks_ue 5704
This command is considered to supersede nmissing.
ORIGINAL POST BELOW July 9 2014
Various commands help. See e.g. codebook. For one user-written command, install nmissing.
. search nmissing, historical
Search of official help files, FAQs, Examples, SJs, and STBs
FAQ . . . . . . Can I quickly see how many missing values a variable has?
. . . . . . . . . . . . . . . . . . UCLA Academic Technology Services
7/08 http://www.ats.ucla.edu/stat/stata/faq/nmissing.htm
Example . . . . . . . . . . . . . . . . . . . . Useful non-UCLA Stata programs
. . . . . . . . . . . . . . . . . . UCLA Academic Technology Services
7/08 http://www.ats.ucla.edu/stat/ado/world/
SJ-5-4 dm67_3 . . . . . . . . . . Software update for nmissing and npresent
(help nmissing if installed) . . . . . . . . . . . . . . . N. J. Cox
Q4/05 SJ 5(4):607
now produces saved results
SJ-3-4 sg67_2 . . . . . . . . . . Software update for nmissing and npresent
(help nmissing, npresent if installed) . . . . . . . . . . N. J. Cox
Q4/03 SJ 3(4):449
updated to include support for by, options for checking
string values that contain spaces or periods, documentation
of extended missing values .a to .z, and improved output
STB-60 dm67.1 . . . . Enhancements to numbers of missing and present values
(help nmissing if installed) . . . . . . . . . . . . . . . N. J. Cox
3/01 pp.2--3; STB Reprints Vol 10, pp.7--9
updated with option for reporting on observations
STB-49 dm67 . . . . . . . . . . . . . Numbers of missing and present values
(help nmissing if installed) . . . . . . . . . . . . . . . N. J. Cox
5/99 pp.7--8; STB Reprints Vol 9, pp.26--27
commands to list the numbers of missing values and nonmissing
values in each variable in varlist
Here is an example:
. webuse nlswork
(National Longitudinal Survey. Young Women 14-26 years of age in 1968)
. nmissing
age 24
msp 16
nev_mar 16
grade 2
not_smsa 8
c_city 8
south 8
ind_code 341
occ_code 121
union 9296
wks_ue 5704
tenure 433
hours 67
wks_work 703
gen avedmajormissing = missing(avedmajor). Note also that your syntax does nothing about extended missing values and is only for numeric variables.