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.
The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at 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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 27651 views
  • 0 likes
  • 3 in conversation