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: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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