BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mt88
Calcite | Level 5

Hello,

 

I am using proc corr with the nomiss option to calculate Cronbach's alpha:

 

proc corr data = datasetname nomiss alpha;

 

I am getting this error:

 

ERROR: The NOMISS option is specified, but all variables have at least one missing value
for all observations in the input data set.

 

I'm new to this statistic so I'm not sure how to resolve this issue. Any information would be appreciated. 

 

Thank you, Matt

1 ACCEPTED SOLUTION

Accepted Solutions
mkeintz
PROC Star

First, it would be good to see the actual code that produced this error message.

 

But in short, let's say you have 10 variables.  The NOMISS options tells SAS to throw away any observations in which at least one of those variables is missing.   So, theoretically if each of the 10 variables was missing only(!!) 10% of the time, it's possible that each observation would have a single missing value, and would therefore be discarded,  leaving no observations to submit to the proc corr.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

View solution in original post

3 REPLIES 3
WarrenKuhfeld
Ammonite | Level 13

You might start by printing the data set. Is this really the kind of data set that you want to use with nomiss? Obviously not, but look at the data and convince yourself. Then either don't specify the option or get a different data set that is more complete or use fewer variables.

mkeintz
PROC Star

First, it would be good to see the actual code that produced this error message.

 

But in short, let's say you have 10 variables.  The NOMISS options tells SAS to throw away any observations in which at least one of those variables is missing.   So, theoretically if each of the 10 variables was missing only(!!) 10% of the time, it's possible that each observation would have a single missing value, and would therefore be discarded,  leaving no observations to submit to the proc corr.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
ballardw
Super User

Show your entire proc corr code.

If you are interested in specific variables you may need/want fewer variables on a VAR and/or WITH statement.

 

From the documentation NOMISS

Excludes observations with missing analysis values from the analysis

So you have told the procedure to use records that have, without more code shown, to use all numeric variables but only if none of them have missing values. Since the error message says every record has at least one missing variable all the records are excluded.

 

If you are interested in just some variables the use a VAR statement to list them. The WITH statement would do correlations between the varaibles on a VAR statement and those on a WITH statement only.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1208 views
  • 0 likes
  • 4 in conversation