Description Details Objects from the Class Slots Methods Author(s) See Also Examples
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”.
This class contains information in its slots about what restrictions are placed on a factor analysis model, which defines the model to be estimated.
These classes are fundamental in FAiR and fulfill two important roles. First, they
serve as a vessel that contains the parameter matrices and other necessary information to estimate
different factor analysis models via Factanal
. During the genetic optimization
proccess, the restrictions2model
method repeatedly calls
make_parameter-methods
to “fill” the “empty” x
slots
of the matrices within the "restrictions"
object that inherit from
parameter-class
. Eventually, the optimal parameters satisfying the
specified constraints are found by the genetic algorithm and the create_FAobject
creates an object that inherits from class FA-class
on the basis of this
“filled” "restrictions"
object.
The second purpose of a "restrictions"
object is to remind the user of exactly what
restrictions were imposed during the estimation process, which is why a tailored
show
method is essential.
Here is a table of the class hierarchy:
Class | Parent Class | Corresponding Model |
"restrictions" | none | none (virtual class) |
"restrictions.independent" | "retrictions" | zero factor null model |
"restrictions.factanal" | "restrictions" | EFA via factanal algorithm |
"restrictions.orthonormal" | "restrictions" | EFA via a different algorithm |
"restrictions.1storder" | "restrictions" | Models with correlated factors |
"restrictions.1storder.EFA" | "restrictions.1storder" | EFA after factor transformation |
"restrictions.general" | "restrictions.1storder" | SEFA and CFA |
"restrictions.2ndorder" | "restrictions.general" | SEFA and CFA |
Objects can be created by calls of the form new("restrictions", ...)
.
However, it is not recommended to do so in normal usage because
make_restrictions
provides the constructor for users.
The "restrictions"
class is virtual has the following slots:
factors
:An integer vector of length two indicating the number of factors at level one and level two of the model, must be nonnegative
nvars
:An integer indicating the number of free parameters in the
model, which corresponds to the nvars
argument to
genoud
.
dof
:An integer indicating the number of degrees of freedom for the factor analysis model
Domains
:A numeric matrix with nvars
rows and exactly two
columns indicating the lower and upper bounds for each free parameter,
which corresponds to the Domains
argument to genoud
.
model
:A character string indicating whether a "SEFA"
,
"EFA"
, or "CFA"
model is to be estimated.
discrepancy
:A character string indicating which discrepancy function
is used to estimate the model, see the options for the same argument to
make_manifest
free
:A logical vector that indicates which of the parameters in the various matrices are free and which are considered fixed, excluding parameters that are “obviously” fixed.
An object of class "restrictions.independent"
inherits from
"restrictions"
and is used to define a “null” model where there are
no factors (hence factors = c(0L,0L)
) and the only parameters to estimate
are the manifest standard deviatiations. It has two additional slots:
scale
:an object of parameter.scale-class
criteria
:A list with one function, the discrepancy function that will
be minimized to estimate the model and is that named by the discrepancy
slot
An object of class "restrictions.factanal"
inherits from "restrictions"
but has the same slots. This class is used for exploratory factor analysis via the
same restrictions that are used in factanal
. An object of class
"restrictions.orthonormal"
inherits from "restrictions"
and also implies
exploratory factor analysis but instead imposes the restrictions that the upper
triangle of the coefficient matrix has all zeros. It has the following additional slots:
beta
:an object of parameter.coef-class
where the x
slot is a primary pattern matrix with 0.0 in its upper triangle and NA
elsewhere
scale
:an object of parameter.scale-class
criteria
:A list with one function, the discrepancy function that will
be minimized to estimate the model and is that named by the discrepancy
slot
An object of class "restrictions.1storder"
inherits from "restrictions"
and is used for factor analysis models with multiple correlated factors. It has the
following additional slots:
Phi
:an object of parameter.cormat-class
beta
:an object that inherits from parameter.coef-class
. If
model = "CFA"
it should be of parameter.coef-class
or
parameter.coef.nl-class
, depending on whether there are any nonlinear
exact restrictions to impose. If model = "SEFA"
, it should be of
parameter.coef.SEFA-class
or parameter.coef.SEFA.nl-class
,
again depending on whether there are any nonlinear exact restrictions to impose.
Unlike the case for "restrictions.orthonormal"
, its x
slot can have
any combination of free and fixed cells.
coef
:an object of parameter.scale-class
A list of functions to be evaluated as lexical criteria during the
lexical optimization process. Hence, this list may contain more than one function
but the function named in the discrepancy
slot must be the last element.
Preceeding list elements should be functions that return -1.0 if the constraint
is satisfied and some number greater than -1.0 if the constraint is not satisfied
An object of class "restrictions.1storder.EFA"
inherits from
"restrictions.1storder"
and is used for exploratory factor analysis after the
preliminary factors have been transformed. It has the following additional slots:
Lambda
:A numeric matrix with zeros in its upper triangle containing the
preliminary factor loadings, in other words the x
slot of the beta
slot of an object of class "restrictions.orthonormal"
A logical indicating whether the transformation was orthogonal or
oblique. Rotate
only supports oblique transformations, but it is
possible to “import” an orthogonal transformation from the GPArotation
package using the GPA2FA
function
A square numeric matrix whose order is equal to the number of factors that was found during the factor transformation process. Note that this matrix should have unit-length columns, whereas many textbooks instead specify unit-length rows
A list, usually containing functions that were used as lexical criteria
during the lexical optimization process (see Rotate
) If the
GPArotation package was used to find the transformation, then this list must
be a single character string naming the analytic criterion used
An object of class "restrictions.general"
inherits from
"restrictions.1storder"
and is used for SEFA and CFA with a single second-order
factor that explains the systematic correlation among the first-order factors. It has one
additional slot,
Delta
:an object of parameter.coef-class
or
parameter.coef.nl-class
, depending on whether there are any
nonlinear exact restrictions to impose. Its x
slot has only one column
but it can have any combination of free and fixed cells
An object of class "restrictions.2ndorder"
inherits from "restrictions.general"
and is used for SEFA and CFA models with multiple second-order factors to explain the
systematic correlation among the first-order factors. Its Delta
slot now must
only inherit from parameter.coef-class
and hence can also be
parameter.coef.nl-class
if model = "CFA"
or, if
model = "SEFA"
can be of parameter.coef.SEFA-class
or
parameter.coef.SEFA.nl-class
, again depending on whether there are any
nonlinear exact restrictions to impose at level two. The "restrictions.2ndorder"
class has one additional slot,
Xi
:an object of parameter.cormat-class
signature(object = "restrictions")
, prints the object
in a relatively easy-to-digest format and there are tailored methods for almost
all of the classes that inherit from the "restrictions"
class
The following methods are listed here but documented elsewhere
the restrictions2model
methods take a grand
parameter vector and “fill” in the free cells of the appropriate matrices
with a "restrictions"
object
the fitS4
methods evaluate all the lexical criteria
given a “filled” object that inherits from class "restrictions"
the bfgs_fitS4
methods return the discrepancy function
given a “filled” object that inherits from class "restrictions"
the gr_fitS4
methods return the gradient of the discrepancy
function given a “filled” object that inherits from class "restrictions"
the bfgs_fitS4
methods return a list that is then passed
to the bfgs_fitS4
and gr_fitS4
methods; see the
BFGShelp
argument to genoud
the create_start
methods return a matrix of starting
values for the genetic algorithm; see also genoud
the create_FAobject
methods return an object that
inherits from FA-class
once the optimal estimates have been found
the restrictions2draws
methods return a list
of arrays of simulated draws from the sampling distribution of the estimated free
parameters
the restrictions2RAM
methods convert an object
that inherits from class "restrictions"
from that parameterization used in
the FAiR package to the reticular action model (RAM) parameterization used in
the sem package
the loadings
methods extact the factor loadings
the coef,restrictions-method
s also extract the factor loadings
the cormat
methods extract the correlation matrices among
factors
the uniquenesses
methods extract the uniquenesses
the fitted,restrictions-method
s produce a correlation or
covariance matrix as a function of the model parameters
the df.residual,restrictions-method
s extract the
degrees of freedom for the factor analysis model
Ben Goodrich
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.