BookmarkSubscribeRSS Feed
amcr729
Fluorite | Level 6

Hello all, 

I have a simple problem. I am trying to compute cronbach's alpha for a group of dichotomous items (0/1) -- see code below -- but am getting error message that the first variable name is not valid. There is nothing wrong with the variable name -- when I run a proc freq for it, I have no problem. I wonder if the problem is trying to compute cronbach's alpha for dichotomous items? I know the Kuder-Richardson Formula 20 (KR-20) was developed to assess reliability for dichotomous items, but my understanding was that it is also acceptable to compute cronbach's alpha for dichotomous items. It is my preference to use alpha because it is more familiar to readers. If someone can help me understand the problem I would be grateful!

 

proc corr data=si nomiss alpha;

   var  bl_sw_stigma7 bl_sw_stigma8 bl_sw_stigma9 ;

run;

 

ERROR: " BL_SW_STIGMA7" is not a valid name.

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @amcr729,

 

Your code as posted runs without problems with dummy data I've just created. The code with the double "blank" after the VAR keyword, the error message and the "blank" it contains after the first quotation mark suggest that in your real code there is an invisible character (e.g., a non-breakable space 'A0'x) between "var" and "bl_sw_stigma7" which the compiler sees as an invalid character in the first variable name (like "var §bl_sw_stigma7"). So, deleting that character (and possibly other irregular "blank" characters, if any) should solve the problem.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 955 views
  • 1 like
  • 2 in conversation