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.
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 29461 views
  • 0 likes
  • 3 in conversation