PING
0.9
Statistical data handling and processing in production environment
|
Return the number of missing and non-missing values of a given variable in a dataset.
dsn
: a dataset reference;var
: a field name whose information is provided;lib
: (option) output library; default: lib
is set to WORK
._count_, _nmiss_
: (option) names of the macro variables used to store the count or non-missing and missing values of the var variable in the dataset respectively; though both optional, one at least should be passed.
Let us consider the table _dstest28
:
geo | value |
---|---|
' ' | 1 |
AT | . |
BG | 2 |
'' | 3 |
FR | . |
IT | 5 |
then we can find the number of non-missing/missing value
by running:
which returns count=4
and nmiss=2
.
Run macro %_example_var_count
for more examples.