Help using Base SAS procedures

Proc Summary with missing values

Reply
Contributor
Posts: 36

Proc Summary with missing values

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
PROC Star
Posts: 1,322

Re: Proc Summary with missing values

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.
Contributor
Posts: 36

Re: Proc Summary with missing values

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.
Super Contributor
Super Contributor
Posts: 365

Re: Proc Summary with missing values

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
Contributor
Posts: 36

Re: Proc Summary with missing values

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,
Super Contributor
Super Contributor
Posts: 365

Re: Proc Summary with missing values

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
Contributor
Posts: 36

Re: Proc Summary with missing values

Thanks for the information
Ask a Question
Discussion stats
  • 6 replies
  • 9250 views
  • 0 likes
  • 3 in conversation