BookmarkSubscribeRSS Feed
R_Win
Calcite | Level 5
Hi i have a data set

data d;
input name $ age;
cards;
23 nani
45 rahul
34 muni

Now i want the no of missing and no missing observations in that obseravions

Message was edited by: Main

Message was edited by: Main Message was edited by: Main
1 REPLY 1
data_null__
Jade | Level 19
[pre]
* Test data;
data class;
set sashelp.class;
if _n_ in(3,5,7) then call missing(of _character_);
if _n_ in(4,8) then call missing(of _numeric_);
run;

* group data as missing or non-missing;
proc format;
value miss ._-.Z = '2' other='1';
value $miss ' ' = '2' other='1';
run;
* count;
ods listing close;
proc freq data=class;
tables _all_ / missing;
format _character_ $miss. _numeric_ miss.;
ods output oneWayFreqs=OneWayFreqs;
run;
ods listing;

* prepare data for display;
data Report(keep=Var N Nmiss);
length Var $32;
array _ns[2] N Nmiss;
do until(last.table);
set OneWayFreqs;
by table notsorted;
var = scan(table,-1);
_ns(input(vvaluex(var),F1.)) = Frequency;
end;
run;
proc print;
run;
[/pre]

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 533 views
  • 0 likes
  • 2 in conversation