restrictions-class {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''.
This class contains information in its slots about what restrictions
are placed on a factor analysis model. As an overview, objects of class
"restrictions.factanal"
are handled by methods that are
analagous to the algorithm in factanal
. Objects
of class "restrictions.orthonormal"
are handled by methods that
estimate an exploratory factor analysis model with orthogonal factors
and zeros in the upper triangle of the coefficient matrix. Objects of
class "restrictions.1storder"
, "restrictions.general"
, and
"restrictions.2ndorder"
are handled by methods that respecitvely
estimate semi-exploratory or confirmatory models for a single equation model
with correlated factors, a model with a general second-order factor
and a model with multiple correlated second-order factors.
Essentially, an object that inherits from class "restrictions"
acts as
a vessel that contains matrices and necessary information to estimate
the corresponding model. The par
argument to the methods for
fitS4-methods
, bfgs_fitS4-methods
, and
gr_fitS4-methods
fills the free elements of the
appropriate matrix and then the appropriate functions are evaluated in search
of the optimal parameters that satisfy the constraints. For more details, see
the Classes.R and S4methods.R files in the FAiR/R subdirectory.
Objects can be created by calls of the form new("restrictions", ...)
.
However, it is not recommended to do so in normal usage. make_restrictions
provides a constructor that
reacts to the responses the user gives to the pop-up menus, but it too
would rarely need to be called explicitly since it is called internally by
Factanal
when the restrictions
argument to Factanal
is unspecified. There are several examples of manual
creation of objects of class "restrictions"
in the tests.R file in the FAiR/tests subdirectory and in the examples for Factanal.Rd in the FAiR/man subdirectory.
An object of class "restrictions" has the following slots:
"numeric"
. A numeric vector of length two
indicating the number of factors in the model. In the case of a one-level model
the second element should be zero."numeric"
. The number of
free parameter in the model, which corresponds to the nvars
argument to genoud
."matrix"
A matrix with
nvars
rows and two columns indicating the lower and upper
bounds for each free or potentially free parameter in the model,
which corresponds to the Domains
argument to
genoud
. "character"
A character
string indicating whether a SEFA, EFA, or CFA model is to be estimated."character"
A character
string indicating whether MLE or YWLS is to be used to estimate
the model.
An object of class "restrictions.factanal"
extends "restrictions"
and has one additional slot, named fast
, which is a logical that indicates
whether factanal
should be called (essentially) in lieu of
genoud
.
An object of class "restrictions.orthonormal"
extends "restrictions"
and has the following additional slots:
beta
,
which is a matrix with as many columns as there are outcome variables
and as many columns as there are factors. There should be zeros in the
upper triangle of this matrix and NA_real_
elsewhere. free
is a logical vector indicating which cells of beta
are
NA_real_
. num_free
is a scalar indicating the number of
cells in beta
that are NA_real_
.Theta2
, which is
a diagonal covariance matrix of uniquenesses.
An object of class "restrictions.1storder"
extends "restrictions"
and has the same additional slots as objects of class
"restrictions.orthonormal"
. There are, however, a few differences. First,
Phi
is a diagonal matrix with 0.5 in all of its diagonal elements.
Second, the criteria
slot can be a list with more than one
function to be evaluated in the lexical optimization process. Third, the
beta
element of the beta
slot can have any pattern of
NA_real_
and / or fixed numbers in its cells to indicate free and fixed
coefficients respectively. Third, the beta
slot has one or two additional
list elements. The first of these is select
which is a logical
vector indicating which elements of the grand parameter vector correspond
to free cells of the coefficient matrix. The second of these, which is
included only when semi-exploratory factor analysis is utilized, is
fix_beta_args
and is itself a list with named elements corresponding
to the important but not exported function FAiR:::FAiR_fix_coefficients
.
An object of class "restrictions.general"
extends "restrictions"
and has the same additional slots as objects of class
"restrictions.1storder"
with one addition:
Delta
,
which is a one-column matrix with as many rows as there are
first-order factors factors. Free elements of this matrix should
be NA_real_
and fixed elements should be specified as
numbers on the (-1,1) interval. free
is a logical vector
indicating which cells of Delta
are NA_real_
.
num_free
is a scalar indicating the number of
cells in Delta
that are NA_real_
.
An object of class "restrictions.2ndorder"
extends "restrictions"
and has the same additional slots as objects of class
"restrictions.general"
with the following addition:
Delta
element of the Delta
slot is a
matrix with more than one column to estimate the effect of multiple
second-order factors with any pattern of NA_real_
and fixed
numbers to indicate free and fixed coefficients. Also, the Delta
slot has additional list elements, select
and possibly
fix_Delta_args
, which are analagous to the elements with the
corresponding names in the beta
slot.
Ben Goodrich http://wiki.r-project.org/rwiki/doku.php?id=packages:cran:fair
showClass("restrictions") showClass("restrictions.orthonormal") showClass("restrictions.1storder") showClass("restrictions.general") showClass("restrictions.2ndorder")