| create_FAobject {FAiR} | R Documentation |
It is not necessary to understand this help page if one merely wants to estimate a factor analysis model. This help page is intended for those who want to modify or extend FAiR or otherwise want some idea of how FAiR works “behind the scenes”.
The classes that inherit from "FA" encapsulate estimates
from factor analysis models. First, the constructor(s) will be
discussed.
## S4 method for signature 'restrictions, manifest.basic':
create_FAobject(restrictions, manifest, opt, call, scores, lower,
analytic)
restrictions |
object of restrictions-class |
manifest |
object of manifest-class |
opt |
The list produced by genoud |
call |
the call to Factanal |
scores |
A character string indicating what kind of factor scores to
calculate; see the same argument to Factanal |
lower |
A small numeric scalar indicating the lower bound for positive
definiteness or minimum uniqueness; see the corresponding argument
to Factanal. |
analytic |
A logical indicating whether analytic gradients were used. |
The methods for create_FAobject are called internally right at the end of
Factanal. They take the result of the optimization and produce an
object that inherits from class "FA", which is conceptually simple, although the
implementation is somewhat complicated and relies on a bunch of helper functions that
are not exported.
The methods for create_FAobject produce an object of class "FA" or that
inherits from class "FA" as appropriate.
Objects can be created by calls of the form new("FA", ...). However,
this use of new("FA", ...) is not recommended because both
Factanal and Rotate provide constructors for users
with the help of the formal methods defined for create_FAobject.
The "FA" class is not virtual but does serve as the basis for some inherited
classes. Its slots are:
restrictions-classFactanal the user specifies that factor
scores should be calculated, this matrix contains the factor scores
and will have as many rows as there are observations and as many columns as
there are (first-order) factors.manifest-classFactanal and Rotate.Factanal.unif.seed used by genoud and the
int.seed in the call to Factanal. If Rotate
is used to transform the factors after preliminary factors have been extracted
as part of exploratory factor analysis, this matrix has a second row containing
unif.seed and int.seed used in the call to Rotate.
An object of "FA.EFA" inherits from the "FA" class and has the following
additional slots:
"primary" and contains the
transformation matrix that postmultiplies Lambda to yield the rotated
primary pattern matrix. Its second shelf is called "reference" and contains
the transformation matrix that postmultiplies Lambda to yield the rotated
reference structure matrix. Its third shelf is called "T" and contains the
matrix whose crossprod is the correlation matrix among primary
factors. If rotated = FALSE, then all of these transformation matrices are
identity matrices.
An object of "FA.general" inherits from the "FA" class and its
restrictions slot has an object of restrictions.general-class
It also has the following additional slots:
loadings slot. However, since there is only one second-order factor,
there is no distinction among the various pattern and structure matrices. The
factor contribution matrix in the fifth shelf is simply the square of these loadings
An object of "FA.2ndorder" inherits from the "FA.general" class and its
restrictions slot has an object of restrictions.2ndorder-class.
It also has an additional slot,
correlations_2nd:correlations slot but obviously pertains to the correlations among
second-order factors rather than first-order factors.
The create_FAobject methods construct an object that inherits from class
"FA" but their signatures hinge on restrictions-class and
(in the future) manifest-class.
The following methods are defined for the various classes that inherit from "FA":
signature(object = "FA")signature(object = "FA")signature(object = "FA")signature(object = "FA")signature(x = "FA", y = "ANY")signature(fitted = "FA")signature(object = "FA")signature(object = "FA")signature(object = "FA")
In addition, the following methods are defined for classes that inherit from class
"FA" that are documented in loadings or S3methodsFAiR
but are also listed here:
coefpairs plot among reference structure
correlations taken two reference factors at a time
In addition, the following functions are not S4 generics but nevertheless expect
an object that inherits from "FA" class and will throw an error otherwise:
model_comparison function produces test
statistics and fit indicespaired_comparison function tests one
model against another model in which it is nestedFA2draws function is essentially a wrapper around
the restrictions2draws generic function but is more convenientFA2RAM function is essentially a wrapper around the
restrictions2RAM generic function but is more convenientRotate function finds an optimal transformation of
preliminary factors in exploratory factor analysisGPA2FA function requires an object of "FA.EFA"
classBen Goodrich
showClass("FA")
showClass("FA.EFA")
showClass("FA.general")
showClass("FA.2ndorder")