10.2 Summary#
Summed up, the usage of the factor_analyzer
package is similar to previously introduced workflows for statistical modeling. Please read through the documentation for a detailed overview.
https://factor-analyzer.readthedocs.io/en/latest/factor_analyzer.html
fa_object = FactorAnalyzer(n_factors=3,
rotation='promax',
method='minres',
use_smc=True,
is_corr_matrix=False,
bounds=(0.005, 1),
impute='median',
svd_method='randomized',
rotation_kwargs=None)
For the FactorAnalyzer
object, we have several options as described in the documentation. The most important ones are:
n_factors
: The number of factorsrotation
: The type of rotation to perform after fitting the factor analysis modelmethod
: The fitting method to useis_corr_matrix
can be set toTue
if the data is already a correlation matrix
We can then fit the model and extract its estimates such as eigenvalues, loadings, and communalities:
fa_object.fit(data)
ev, cfev = fa.get_eigenvalues()
l = fa2.loadings_
c = fa2.get_communalities()