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. In the toolbar, go to Calculation > Custom Calculation.
2. Click on the Page to create the output.
3. In the Code panel, 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 Sources tree into the Code
panel, and then ensuring the variables are in a comma-separated list.
5. Click Calculate and/or ensure Calculate automatically is checked.
UPCOMING WEBINAR: Run Research Your Way With AI Skills