You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/index.rst
+81-35Lines changed: 81 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,45 +6,89 @@
6
6
Welcome to the FactorAnalyzer documentation!
7
7
==============================================
8
8
9
-
This is Python module to perform exploratory factor analysis, with optional varimax and promax rotations. Estimation can be performed using a minimum residual (minres) solution, or maximum likelihood estimation (MLE).
10
-
11
-
Portions of this code are ported from the excellent R library psych.
9
+
This is a Python module to perform exploratory and factor analysis (EFA), with several
10
+
optional rotations. It also includes a class to perform confirmatory factor
11
+
analysis (CFA), with certain pre-defined constraints. In expoloratory factor analysis,
12
+
factor extraction can be performed using a variety of estimation techniques. The
13
+
``factor_analyzer`` package allows users to perfrom EFA using either (1) a minimum
14
+
residual (MINRES) solution, (2) a maximum likelihood (ML) solution, or (3) a principal
15
+
factor solution. However, CFA can only be performe using an ML solution.
16
+
17
+
Both the EFA and CFA classes within this package are fully compatible with `scikit-learn`.
18
+
Portions of this code are ported from the excellent R library `psych`, and the `sem`
19
+
package provided inspiration for the CFA class.
12
20
13
21
Description
14
-
==================
15
-
16
-
Exploratory factor analysis (EFA) is a statistical technique used to identify latent relationships among sets of observed variables in a dataset. In particular, EFA seeks to model a large set of observed variables as linear combinations of some smaller set of unobserved, latent factors.
17
-
18
-
The matrix of weights, or factor loadings, generated from an EFA model describes the underlying relationships between each variable and the latent factors. Typically, a number of factors (K) is selected such that is substantially smaller than the number of variables. The factor analysis model can be estimated using a variety of standard estimation methods, including but not limited to OLS, minres, or MLE.
19
-
20
-
This package includes a stand-alone Python module with a ``FactorAnalyzer()`` class. The class includes an ``analyze()`` method that allows users to perform factor analysis using either minres or MLE, with optional rotations on the factor loading matrices. The package also offers a stand-alone ``Rotator()`` class to perform common rotations on an unrotated loading matrix.
21
-
22
-
The ``factor_analyzer`` package offers the following rotation methods:
23
-
24
-
* The **varimax** (orthogonal)
25
-
26
-
* The **promax** (oblique)
27
-
28
-
* The **quartimax** (orthogonal)
29
-
30
-
* The **quartimin** (oblique)
31
-
32
-
* The **obliimax** (orthogonal)
33
-
34
-
* The **oblimin** (oblique)
35
-
36
-
* The **obliimax** (orthogonal)
37
-
38
-
* The **equamax** (orthogonal)
39
-
40
-
This package includes a stand-alone Python module with a ``FactorAnalyzer()`` class. The class includes an ``analyze()`` method that allows users to perform factor analysis using either minres or MLE, with optional promax or varimax rotations on the factor loading matrices. The package also offers a stand-alone ``Rotator()`` class to perform common rotations on an unrotated loading matrix.
22
+
============
23
+
24
+
Exploratory factor analysis (EFA) is a statistical technique used to
25
+
identify latent relationships among sets of observed variables in a
26
+
dataset. In particular, EFA seeks to model a large set of observed
27
+
variables as linear combinations of some smaller set of unobserved,
28
+
latent factors. The matrix of weights, or factor loadings, generated
29
+
from an EFA model describes the underlying relationships between each
30
+
variable and the latent factors.
31
+
32
+
Confirmatory factor analysis (CFA), a closely associated technique, is
33
+
used to test an a priori hypothesis about latent relationships among sets
34
+
of observed variables. In CFA, the researcher specifies the expected pattern
35
+
of factor loadings (and possibly other constraints), and fits a model according
36
+
to this specification.
37
+
38
+
Typically, a number of factors (K) in an EFA or CFA model is selected
39
+
such that it is substantially smaller than the number of variables. The
40
+
factor analysis model can be estimated using a variety of standard
41
+
estimation methods, including but not limited MINRES or ML.
42
+
43
+
Factor loadings are similar to standardized regression coefficients, and
44
+
variables with higher loadings on a particular factor can be interpreted
45
+
as explaining a larger proportion of the variation in that factor. In the
46
+
case of EFA, factor loading matrices are usually rotated after the factor
47
+
analysis model is estimated in order to produce a simpler, more interpretable
48
+
structure to identify which variables are loading on a particular factor.
49
+
50
+
Two common types of rotations are:
51
+
52
+
1. The **varimax** rotation, which rotates the factor loading matrix so
53
+
as to maximize the sum of the variance of squared loadings, while
54
+
preserving the orthogonality of the loading matrix.
55
+
56
+
2. The **promax** rotation, a method for oblique rotation, which builds
57
+
upon the varimax rotation, but ultimately allows factors to become
58
+
correlated.
59
+
60
+
This package includes a ``factor_analyzer`` module with a stand-alone
61
+
``FactorAnalyzer`` class. The class includes ``fit()`` and ``transform()``
62
+
methods that enable users to perform factor analysis and score new data
63
+
using the fitted factor model. Users can also perform optional otations
64
+
on a factor loading matrix using the ``Rotator`` class.
65
+
66
+
The following rotation options are available in both ``FactorAnalyzer``
67
+
and ``Rotator``:
68
+
69
+
(a) varimax (orthogonal rotation)
70
+
(b) promax (oblique rotation)
71
+
(c) oblimin (oblique rotation)
72
+
(d) oblimax (orthogonal rotation)
73
+
(e) quartimin (oblique rotation)
74
+
(f) quartimax (orthogonal rotation)
75
+
(g) equamax (orthogonal rotation)
76
+
77
+
In adddition, the package includes a ``confirmatory_factor_analyzer``
78
+
module with a stand-alone ``ConfirmatoryFactorAnalyzer`` class. The
79
+
class includes ``fit()`` and ``transform()`` that enable users to perform
80
+
confirmatory factor analysis and score new data using the fitted model.
81
+
Performing CFA requires users to specify in advance a model specification
82
+
with the expected factor loading relationships. This can be done using
83
+
the ``ModelSpecificationParser`` class.
41
84
42
85
Requirements
43
86
==================
44
-
- Python 3.4 or higher
45
-
- ``numpy``
46
-
- ``pandas``
47
-
- ``scipy``
87
+
- Python 3.4 or higher
88
+
- ``numpy``
89
+
- ``pandas``
90
+
- ``scipy``
91
+
- ``scikit-learn``
48
92
49
93
Installation
50
94
==================
@@ -55,14 +99,16 @@ You can install this package via ``pip`` with:
55
99
56
100
Alternatively, you can install via ``conda`` with:
0 commit comments