我正在尝试计算包含28项的刻度的内部一致性。
alpha(df)
失败
Likely variables with missing values are dast11_recode dast20
Error in principal(x, scores = FALSE) :
I am sorry: missing values (NAs) in the correlation matrix do not allow me to continue.
Please drop those variables and try again.
In addition: Warning message:
In cor(r, use = use) : the standard deviation is zero
变量'dast20'似乎是导致问题的原因,因为运行alpha(select(df, -dast20))
运行正常。
alpha(na.omit(df))
也运行良好,但给出警告
Item = dast20 had no variance and was deleted but still is counted in the score
var(df$dast20) = 0.0009784736
具体来说,dast20
包含1022个观测值('0' - 1021; '1' - 1
)。
我想知道为什么这会给我带来问题,这样我就可以确定正确的解决方案。
如果分析变量dast20
内的类的频率:
table(df$dast20)
你会看到你没有可变性,所以它不是一个变量,它不会给Cronbach's α的估计增加任何东西。