Help using Base SAS procedures

Cronbach's alpha (standardized) using proc corr

Reply
Occasional Contributor
Posts: 6

Cronbach's alpha (standardized) using proc corr

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;

Attachment
PROC Star
Posts: 7,360

Cronbach's alpha (standardized) using proc corr

Can you post your code along with some example data?

Occasional Contributor
Posts: 6

Cronbach's alpha (standardized) using proc corr

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

PROC Star
Posts: 7,360

Cronbach's alpha (standardized) using proc corr

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;

Ask a Question
Discussion stats
  • 3 replies
  • 218 views
  • 0 likes
  • 2 in conversation