I know proc means with N and Nmiss option provides the no of populated and missing observation for numeric variable. But which proc/options we use to know the missing value of character variable ?
Lets have the below data set as an example.
data abc;
input name $ state $;
datalines;
a up
b mp
c .
d hp
e .
f mp
. gj
h hp
;
run;
Proc freq with missing option:
proc freq data=abc;
tables state / missing nocum nopercent;
run;
PROC SQL.
data abc;
input name $ state $;
datalines;
a up
b mp
c .
d hp
e .
f mp
. gj
h hp
;
run;
proc sql;
select nmiss(name) as nmiss_name,nmiss(state) as nmiss_state
from abc;
quit;
For a discussion and examples, see the article "Count the number of missing values for each variable."
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.