BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
_maldini_
Barite | Level 11

According to SAS documentation, In PROC SURVEYMEANS, the MISSING option "treats missing values as a valid (nonmissing) category for all categorical variables, which include CLASS, STRATA, CLUSTER, DOMAIN, and POSTSTRATA variables."

 

It doesn't turn blue and I only get error messages when I run it. 

 

What am I doing wrong here? 

Screenshot 2023-02-08 at 8.32.40 PM.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The MISSING option for Proc Surveymeans refers to the PROC statement, not the individual statements such as Domain.

If you clicked on the MISSING text in the Domain/Cluster etc statements in the documentation then you should notice that it took you to a different page.

The clue that this is not a per statement option is the "all categorical". Which means just that ALL of the variables used on any of those statements will treat missing as valid for all variables.

So you would use

Proc surveymeans data=&dataset nomcar MISSING;

 

 

MISSING

treats missing values as a valid (nonmissing) category for all categorical variables, which include CLASS , STRATA , CLUSTER , DOMAIN , and POSTSTRATA variables.

By default, if you do not specify the MISSING option, an observation is excluded from the analysis if it has a missing value. For more information, see the section Missing Values.

View solution in original post

1 REPLY 1
ballardw
Super User

The MISSING option for Proc Surveymeans refers to the PROC statement, not the individual statements such as Domain.

If you clicked on the MISSING text in the Domain/Cluster etc statements in the documentation then you should notice that it took you to a different page.

The clue that this is not a per statement option is the "all categorical". Which means just that ALL of the variables used on any of those statements will treat missing as valid for all variables.

So you would use

Proc surveymeans data=&dataset nomcar MISSING;

 

 

MISSING

treats missing values as a valid (nonmissing) category for all categorical variables, which include CLASS , STRATA , CLUSTER , DOMAIN , and POSTSTRATA variables.

By default, if you do not specify the MISSING option, an observation is excluded from the analysis if it has a missing value. For more information, see the section Missing Values.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 364 views
  • 1 like
  • 2 in conversation