全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3929 0
2019-05-07
大家使用R语言做因子分析时,相信很多人是采用《R语言实战》上面的代码使用fa.parallel和fa这两个函数,但是fa.parallel这个函数经常输出警告:“The estimated weights for the factor scores are probably incorrect.  Try a different factor extraction method.”我今天在做因子分析的时候将这个警告输出的代码定位在fa.stats这个函数里面
R2 <- diag(t(w) %*% f)
    if (is.null(fm)) {
        if (prod(R2) < 0) {
            message("In factor.stats: The factor scoring weights matrix is probably singular -- Factor score estimate results are likely incorrect.\\n Try a different factor extraction method\\n")
            R2[abs(R2) > 1] <- NA
            R2[R2 <= 0] <- NA
        }
        if ((max(R2, na.rm = TRUE) > (1 + .Machine$double.eps))) {
            message("The estimated weights for the factor scores are probably incorrect.  Try a different factor extraction method.")
解决这个问题的方法也很简单,我们只要尝试其他的抽取因子的方法即可:
fm参数介绍:
Factoring method fm="minres" will do a minimum residual as will fm="uls". Both of these use a first derivative. fm="ols" differs very slightly from "minres" in that it minimizes the entire residual matrix using an OLS procedure but uses the empirical first derivative. This will be slower. fm="wls" will do a weighted least squares (WLS) solution, fm="gls" does a generalized weighted least squares (GLS), fm="pa" will do the principal factor solution, fm="ml" will do a maximum likelihood factor analysis. fm="minchi" will minimize the sample size weighted chi square when treating pairwise correlations with different number of subjects per pair. fm ="minrank" will do a minimum rank factor analysis. "old.min" will do minimal residual the way it was done prior to April, 2017 (see discussion below). fm="alpha" will do alpha factor analysis as described in Kaiser and Coffey (1965)
尝试其他的方法,直到警告消失为止。




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群