BookmarkSubscribeRSS Feed
aklr
Calcite | Level 5

I am using proc corr to calculate cronbach's alpha for a certain variable list, but the standardized alpha is coming out as a missing value. I'm not sure why this is happening, and I'm wondering if anyone has a macro to calculate Cronbach's alpha so I can go step by step and possibly figure this out. I know that if there is no variance, the standardized alpha cannot be calculated, but there is variance in the variables I am using. Does anyone have any idea what else could be the problem? Below is an image of the ODS output.

proc corr.JPG

Here is the code I used and attached is some sample data:

proc corr alpha nomiss nocorr nosimple;

      var cbc42 cbc65 cbc69 cbc75 cbc80 cbc88 cbc102 cbc103 cbc111 cbc51 cbc54 cbc56a

     cbc56b cbc56c cbc56d cbc56e cbc56f cbc56g cbc12 cbc14 cbc31 cbc32 cbc33 cbc34

     cbc35 cbc45 cbc50 cbc52 cbc71 cbc89 cbc112;

run;

3 REPLIES 3
art297
Opal | Level 21

Can you post your code along with some example data?

aklr
Calcite | Level 5

Alright I just added my code and sample data. Thanks!

art297
Opal | Level 21

You have one variable that doesn't have any variance, namely cbc51.

If you comment that variable out of your var statement you get the results you were expecting:

proc corr data=have alpha nomiss nocorr nosimple;

    var cbc42 cbc65 cbc69 cbc75 cbc80 cbc88

         cbc102 cbc103 cbc111 /*cbc51*/ cbc54

         cbc56a cbc56b cbc56c cbc56d cbc56e

         cbc56f cbc56g cbc12 cbc14 cbc31 cbc32

         cbc33 cbc34 cbc35 cbc45 cbc50 cbc52

         cbc71 cbc89 cbc112;

run;

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
  • 3 replies
  • 1310 views
  • 0 likes
  • 2 in conversation