This article describes how to calculate Cronbach's Alpha for one or more numeric variables, as in this example showing a table made from a Numeric - Multi variable set where the data consists of responses on a scale from -2 to 2 indicating preference, with -2 being "Hate" and 2 "Love":
to a detailed output including the alpha values:
Requirements
- One or more variables using any numeric data structure.
Method
1. Go to Calculation > Custom Calculation.
2. On the Page drag the pointer to create the output sized as you like.
3. In the object inspector under Properties > R CODE paste in the code below:
library(psych)
df = data.frame(q4a_4, q4b_4, q4c_4, q4d_4, q4e_4, q4f_4)
alpha(df)
4. On the second line of the code, replace the variable Names with the names of the variables in your data: you can do this by dragging and dropping the variable from the Data Sets tree into the R CODE field, and then ensuring the variables are in a comma-separated list.
5. Click Calculate and/or ensure Automatic is checked.