简体   繁体   English

R:心理包的fa.parallel,全局设置为false

[英]R: fa.parallel of psych package, global set to false

I have a problem when invoking fa.parallel() function from the psych package in R. 从R中的psych包调用fa.parallel()函数时遇到问题。

Due to space only the head of the dataset is shown, but i hope you get an Idea of my problem. 由于空间有限,只显示了数据集的标题,但我希望您对我的问题有所了解。

Given the following example dataset: 给定以下示例数据集:

  SQ100 SQ101 SQ102 SQ103 SQ104 SQ105 SQ106 SQ107 SQ108 SQ109 SQ110 SQ111 SQ112
1     1     2     3     2     1     1     2     2    NA    NA    NA     1     1
2     3     2     2     2     1     1     3     2     3     1     3     1     1
3     1     1     1     1     1     1     1     1     1     1     5     1     1
4    NA     1    NA     1     1     1     2     1    NA    NA    NA     1     1
5     1     5     4     2     3     2     3     2     1    NA    NA     2     2
6    NA    NA    NA    NA    NA     2     1     1     1    NA    NA     1     1

I have the categories from 1-5 and NA for missing Values. 对于缺失的值,我有1-5和NA类别。

If I execute 如果我执行

fa.parallel.poly(dataset,global=TRUE)

The console output says: 控制台输出显示:

The items do not have an equal number of response alternatives, global set to FALSE

As you can see in the Table above, there are Variables like "SQ112", which only have the values 1 and 2 or "SQ109" has 1 and NA as responses. 正如您在上表中看到的那样,存在诸如“ SQ112”之类的变量,它们仅具有值1和2或“ SQ109”具有1和NA作为响应。

However that is just the observed data and response alternatives from 1-5 or NA are possible on all Variables, but are simply not observed in that case. 但是,仅在所有变量上都可以观察到数据和1-5或NA的替代响应,但在这种情况下根本无法观察到。

So I want global set to TRUE, but everytime I invoke the function it sets global to false, even if I specifiy it True in the function parameter. 因此,我希望将global设置为TRUE,但是每次调用该函数时,即使我在function参数中将其指定为True,它也会将global设置为false。

What the message is indicating is that in your observed data, not all items have the same number of categories. 该消息指示的是,在您观察到的数据中,并非所有项目都具有相同数量的类别。 The parallel analysis should work anyway. 无论如何,并行分析应该起作用。 As of psych 1.5.1, fa.parallel now has an option to do polychoric correlations directly and so you do not need the fa.parallel.poly call. 从psych 1.5.1开始,fa.parallel现在可以直接进行多色关联,因此您不需要fa.parallel.poly调用。 Just say fa.parallel(dataset,cor="poly"). 只需说fa.parallel(dataset,cor =“ poly”)。 (It will still complain about the data not having an equal number of response alternatives.) (它仍然会抱怨数据没有相同数量的响应选择。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM