To provide a clear understanding of some of the key measures or reliability and their implementation in python
.
To do that I will follow references as close as possible while providing the python code of the implementation of the ideas and examples.
Revelle has greatly created and write many papers in the matter and the library psych
in R
with the corresponding implementations. We would follow Revelle 2021 and 2017, in particlar Revelle 2021 very closely.
We would expand a bit when calculating the omegas and in particular when using the Schmid-Leiman
solution, following Wolff and Presing 2005, as it constains a clear explanations of the theory and the estimation, as in this paper authors describe the implementation in SPSS
and SAS
, which something similar we are trying to do here in python
.
Examples in R.
This work: * Rafael Valero Fernández. (2022). reliabiliPy: measures of survey domain reliability in Python with explanations and examples. Cronbach´s Alpha and Omegas. (v0.0.0). Zenodo.
library("psych")
correlation_matrix <- data.frame(
v0 = c(1.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v1 = c(0.5, 1.0, 0.5, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v2 = c(0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v3 = c(0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v4 = c(0.5, 0.5, 0.5, 0.5, 1.0, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v5 = c(0.5, 0.5, 0.5, 0.5, 0.5, 1.0, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v6 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 1.0, 0.6, 0.6, 0.6, 0.2, 0.2),
v7 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.6, 1.0, 0.6, 0.6, 0.2, 0.2),
v8 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.6, 0.6, 1.0, 0.6, 0.2, 0.2),
v9 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.6, 0.6, 0.6, 1.0, 0.2, 0.2),
v10 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 1.0, 0.7),
v11 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.7, 1.0)
)
correlation_matrix
Now run the analysis
omega(correlation_matrix)
Loading required namespace: GPArotation
Omega
Call: omega(m = correlation_matrix)
Alpha: 0.84
G.6: 0.88
Omega Hierarchical: 0.54
Omega H asymptotic: 0.6
Omega Total 0.9
Schmid Leiman Factor loadings greater than 0.2
With eigenvalues of:
g F1* F2* F3*
2.4 1.8 1.6 1.0
general/max 1.33 max/min = 1.8
mean percent general = 0.36 with sd = 0.05 and cv of 0.13
Explained Common Variance of the general factor = 0.35
The degrees of freedom are 33 and the fit is 0
The root mean square of the residuals is 0
The df corrected root mean square of the residuals is 0
Compare this with the adequacy of just a general factor and no group factors
The degrees of freedom for just the general factor are 54 and the fit is 2.38
The root mean square of the residuals is 0.2
The df corrected root mean square of the residuals is 0.22
Measures of factor score adequacy
g F1* F2* F3*
Correlation of scores with factors 0.74 0.77 0.81 0.81
Multiple R square of scores with factors 0.55 0.60 0.66 0.66
Minimum correlation of factor score estimates 0.10 0.20 0.31 0.33
Total, General and Subset omega for each subset
g F1* F2* F3*
Omega total for total scores and subscales 0.90 0.86 0.86 0.82
Omega general for total scores and subscales 0.54 0.34 0.29 0.24
Omega group for total scores and subscales 0.36 0.51 0.57 0.59
library("psych")
correlation_matrix <- data.frame(
v0 = c(1.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v1 = c(0.5, 1.0, 0.5, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v2 = c(0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v3 = c(0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v4 = c(0.5, 0.5, 0.5, 0.5, 1.0, 0.5, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v5 = c(0.5, 0.5, 0.5, 0.5, 0.5, 1.0, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
v6 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 1.0, 0.6, 0.6, 0.6, 0.2, 0.2),
v7 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.6, 1.0, 0.6, 0.6, 0.2, 0.2),
v8 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.6, 0.6, 1.0, 0.6, 0.2, 0.2),
v9 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.6, 0.6, 0.6, 1.0, 0.2, 0.2),
v10 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 1.0, 0.7),
v11 = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.7, 1.0)
)
omega(correlation_matrix)
Omega
Call: omega(m = correlation_matrix)
Alpha: 0.84
G.6: 0.88
Omega Hierarchical: 0.54
Omega H asymptotic: 0.6
Omega Total 0.9
Schmid Leiman Factor loadings greater than 0.2
With eigenvalues of:
g F1* F2* F3*
2.4 1.8 1.6 1.0
general/max 1.33 max/min = 1.8
mean percent general = 0.36 with sd = 0.05 and cv of 0.13
Explained Common Variance of the general factor = 0.35
The degrees of freedom are 33 and the fit is 0
The root mean square of the residuals is 0
The df corrected root mean square of the residuals is 0
Compare this with the adequacy of just a general factor and no group factors
The degrees of freedom for just the general factor are 54 and the fit is 2.38
The root mean square of the residuals is 0.2
The df corrected root mean square of the residuals is 0.22
Measures of factor score adequacy
g F1* F2* F3*
Correlation of scores with factors 0.74 0.77 0.81 0.81
Multiple R square of scores with factors 0.55 0.60 0.66 0.66
Minimum correlation of factor score estimates 0.10 0.20 0.31 0.33
Total, General and Subset omega for each subset
g F1* F2* F3*
Omega total for total scores and subscales 0.90 0.86 0.86 0.82
Omega general for total scores and subscales 0.54 0.34 0.29 0.24
Omega group for total scores and subscales 0.36 0.51 0.57 0.59