BookmarkSubscribeRSS Feed
srisai
Calcite | Level 5
Hi,

I have written proc sumamry code for getting descriptive statistics, my resultant dataset consists some missing values(numerica variables) and i replaced them with zeros...........by using options missing='0' before the proc statement.
So could you please let me know whether the method which i am following is giving expected results ot not?
Please confirm.

Thanks
Sri
6 REPLIES 6
Quentin
Super User
Hi,
Can you describe your situation a bit more? Where are you seeing missing values (for class variables or summary statistics)? What PROC summary code did you submit?
Keep in mind: the missing option does not replace missing values, it just changes how they are displayed.
--Q.
BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
srisai
Calcite | Level 5
Hi,

I am seeing the missing values for analysis variables.
Here u go,

Proc summary data=dsn nway missing;
class var;
var var;
output out=dsn1;
run;

after running this code some of my analysis varaibles are having blanks i.e. .(dot).Here i want to fill the .(dot) with zero's.
Please advice.
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello Srisai,

Please give us an example of your data. Are you sure that class var; and var var; in you code is what you need?

Sincerely,
SPR
srisai
Calcite | Level 5
Hi,

Just i gave var as variables respectively for class and var.
i ahve actegorical variables in class and contuniuous variables for var.
Here i have some missing values for continuous variables.

Thanks,
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello,

SAS help states that "PROC MEANS excludes missing values for the analysis variables before calculating statistics". I believe that it is also true for proc SUMMARY. So, if you need that your missing values of analysis variables have been treated as zeroes it is necessary to replace them with zeroes in a separate datastep before proc SUMMARY.

SPR
srisai
Calcite | Level 5
Thanks for the information

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
  • 6 replies
  • 26427 views
  • 0 likes
  • 3 in conversation