[R] Issues with fa() function in "psych"

69 views
Skip to first unread message

sagnik chakravarty

unread,
Apr 8, 2014, 2:13:27 AM4/8/14
to r-h...@r-project.org
Hi Team,

I was using your "psych" package for factor analysis and was also comparing
the results with SAS results. I have some suggestions and/or confusions
regarding the fa() function in the package:

- The fa() function *doesn't account for Heywood cases* (communality
greater than 1) and never ever throws out any error related to that which
other softwares do. This is a serious and common issue in iterative factor
analysis and hence should have been accounted for.


- The fa() function doesn't provide "equamax" rotation in its rotation
list and still if you specify "*rotation=equamax*", it will run without
throwing out any error and even mentioning in the result that "equamax" has
been applied. But I have thoroughly compared results from "
*rotation=none*" and "*rotation=equamax*" options and they are exactly
same. *That means fa() is not doing the rotation at all and yet telling
that it is doing that!!* I have even mentioned "*rotation=crap*" option
just to check and surprisingly it ran(without any error) with the result
showing:

*Factor Analysis using method = gls*
* Call: fa(r = cor_mat, nfactors = 4, n.obs = 69576, rotate =
"crap", fm = "gls")*

I hope you understand the severity of this bug and hence
request you to correct this.

- To my sense, there might be some problem with "fm=ml" and "fm=pa"
options since the convergence issue should be with MLE method and not PA
method but while running factor analysis with PA, I am getting the
following warning:

*maximum iteration exceeded*
* The estimated weights for the factor scores are probably
incorrect. Try a different factor extraction method.*

If I compare the results of R and SAS,* I am getting
convergence error for MLE in SAS whereas I am getting the same error for PA
in R *!! I am not being able to understand this mismatch.

- If I call the *loading matrix like efa_pa$loadings, the matrix shown
has many blank cells whereas the final result showing the loadings doesn't
have so* !!

*Loadings:*
* PA1 PA2 PA3 PA4 *
*Var1 0.401 -0.243*
*Var2 0.336 -0.104 0.710*
*Var3 0.624 0.123 0.170 *


- Could you please explain* what the "com" column means* in the output:?


* PA1 PA3 PA2 PA4 h2 u2 com*
*Var1 0.44 0.14 -0.03 -0.10 0.22665 0.773 1.3*
*Var2 0.08 0.11 0.02 0.78 0.62951 0.370 1.1*
*Var3 0.62 0.12 0.15 0.14 0.43578 0.564 1.3*

- Request you to add option for *"equamax" rotation* also if possible.


I have come across the above issues until now. Please do correct me if I am
wrong.

Awaiting your revert which would clear out my confusions,

Thanks for your valuable time,

Sagnik

--
Regards,

*SAGNIK CHAKRAVARTY*

*Mob:* +919972865435
*Email:* sagnik...@gmail.com
sagni...@gmail.com

[[alternative HTML version deleted]]

______________________________________________
R-h...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Pascal Oettli

unread,
Apr 8, 2014, 3:28:46 AM4/8/14
to sagnik chakravarty, r-help
Hello,

And what about submitting your suggestions directly to the package
author/maintainer?

And please don't post in HTML.

Regards,
Pascal
--
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan

William Revelle

unread,
Apr 9, 2014, 10:35:07 AM4/9/14
to Pascal Oettli, r-help, sagnik chakravarty
Sagnik raises the question as to why the psych package does not offer the ‘equamax’ rotation.
It is because all rotations are handled through the GPArotation package which does not offer equamax.

Sagnik also points out that if the requested rotation is not available, fa defaults to rotate=“none” without any warning. I have fixed that for the next release (1.4.4).
(1.4.4 also will fix a bug in corr.test introduced into 1.4.3).


The question about why printing just the loadings matrix leaves blank cells? That is because the loadings matrix of class “loadings” which the default print function prints with a cut = .3.
Using the example from Sagnik, print(efa_pa$loadings,cut=0) will match the output of efa_pa.

The fm=“pa” option runs conventional principal axis factor analysis (ala SPSS). As documented, this iterates max.iter times

"Not all factor programs that do principal axes do iterative solutions. The example from the SAS manual (Chapter 26) is such a case. To achieve that solution, it is necessary to specify that the max.iterations = 1. Comparing that solution to an iterated one (the default) shows that iterations improve the solution. In addition, fm="minres" or fm="mle" produces even better solutions for this example.”

The com column is factor complexity using the index developed by Hofmann (1978). It is a row wise measure of item complexity.
I have added more documentation to this in 1.4.4

Bill
William Revelle http://personality-project.org/revelle.html
Professor http://personality-project.org
Department of Psychology http://www.wcas.northwestern.edu/psych/
Northwestern University http://www.northwestern.edu/
Use R for psychology http://personality-project.org/r
It is 5 minutes to midnight http://www.thebulletin.org

sagnik chakravarty

unread,
Apr 10, 2014, 2:22:55 AM4/10/14
to William Revelle, r-help
Thanks a lot Bill and Revelle for your helpful response.
It would have been great if I could know when we can expect the release of
the edited version 1.4.4.

Sagnik

William Revelle

unread,
Apr 10, 2014, 10:38:13 AM4/10/14
to sagnik chakravarty, r-help
I am probably going to push it to CRAN today or tomorrow.

Bill
> SAGNIK CHAKRAVARTY
>
> Mob: +919972865435
> Email: sagnik...@gmail.com
> sagni...@gmail.com

Gunter Nickel

unread,
May 14, 2014, 5:57:23 AM5/14/14
to r-h...@r-project.org
Hi Sagnik,


sagnik chakravarty wrote
> - Request you to add option for *"equamax" rotation* also if possible.

As GPApackage doesn't provide an explicit function termed "Equamax" you may
want to use Crawford-Ferguson rotation from the GPApackage ( "cfT"). With
the additional argument kappa=m*/(2*p), where m is the number of factors and
p the number of variables/items, you'll be able to achieve a Equamax
rotation. On the equivalence of orthogonal CF with Orthomax family please
refer to Browne, 2001, An overview fo Analytic Rotation in Exploratory
Factor Analysis, Multivariate Behavioural Research, 36 (1), 111-150

Cheers,
Gunter





--
View this message in context: http://r.789695.n4.nabble.com/Issues-with-fa-function-in-psych-tp4688378p4690511.html
Sent from the R help mailing list archive at Nabble.com.

William Revelle

unread,
May 14, 2014, 9:04:23 PM5/14/14
to sagnik chakravarty, Gunter Nickel, r-help
Sagnik,

I did some more checking and in fact you can do equamax through GPA rotation. (Gunter Nickel pointed this out in a post to R-help). I will implement this in version 1.4.6 (1.4.5 is now working its way through the various CRAN mirrors).

You might like 1.4.5 in that I have added various ways of displaying confidence intervals (cats eye plots) as well as upper and lower confidence limits for correlations (cor.plot.upperLowerCi)

Bill

On Apr 10, 2014, at 1:22 AM, sagnik chakravarty <sagnik...@gmail.com> wrote:

> SAGNIK CHAKRAVARTY
>
> Mob: +919972865435
> Email: sagnik...@gmail.com
> sagni...@gmail.com

sagnik chakravarty

unread,
May 16, 2014, 1:24:30 AM5/16/14
to William Revelle, r-help, Gunter Nickel
Hi William,

Thanks for the update. I see this package has so many capabilities ! I will
suggest further for its development if anything else comes to my mind.

Regards,
Sagnik

sagnik chakravarty

unread,
Sep 1, 2014, 11:14:40 AM9/1/14
to William Revelle, r-help, Gunter Nickel
Hi William,

Recently I noticed that if the requested rotation is not available,
"principal" function also defaults to rotate=“none” without any WARNING.
You had earlier fixed the same issue with "fa" in version 1.4.4. Kindly
include the same for "principal" also.

Also, as I had pointed out earlier in my trailing mails, is there any
update on the following suggestion:

"The fa() function doesn't account for 'Heywood cases' (communality greater


than 1) and never ever throws out any error related to that which other
softwares do. This is a serious and common issue in iterative factor
analysis and hence should have been accounted for."

Awaiting your revert,

Thanks and Regards,

Sagnik


On Fri, May 16, 2014 at 10:54 AM, sagnik chakravarty <sagnik...@gmail.com
> wrote:

--
Regards,

SAGNIK CHAKRAVARTY
Statistician, India
sagnik...@gmail.com

Reply all
Reply to author
Forward
0 new messages