Learn R Programming

FAiR (version 0.4-15)

loadings: Extractor ("get") functions

Description

These functions extract various elements of formal S4 objects that are important in factor analysis models, namely the loadings, the correlations among factors, and the unique variances. Occasionally, it may be useful to call these generic functions directly.

Usage

"coef"(object) "coef"(object) "loadings"(x, matrix = "PP", standardized = TRUE) "loadings"(x, matrix = "PP", standardized = TRUE, level = 1) "loadings"(x, standardized = TRUE, level = 1) "cormat"(object, matrix = "PF") "cormat"(object, matrix = "PF", level = 1) "cormat"(object) "cormat"(object, level = 1) "uniquenesses"(object, standardized = TRUE) "uniquenesses"(object, standardized = TRUE, level = 1) "uniquenesses"(object, standardized = TRUE)

Arguments

object
an object that inherits from FA-class or restrictions-class
x
an object that inherits from FA-class or restrictions-class
matrix
a character string with exactly two letters indicating which matrix to extract; see the Details section
standardized
a logical indicating whether to standardize the result so that it is calibrated for a correlation matrix among manifest variables, rather than their covariance matrix
level
either $1$ or $2$ to indicate from which level of the factor analysis model is pertinent when the model has two levels

Value

loadings outputs a matrix of S3 class "loadings", which has a special print method (see print.loadings). coef returns the primary pattern matrix at level one and is not of class "loadings". The cormat methods output a (symmetric) matrix, and the uniquenesses methods output a non-negative numeric vector.

Methods

There are methods for every flavor of FA-class and virtually all flavors of restrictions-class. Also, in the code of cormat, there is a method for objects that inherit from manifest-class.

Details

Let the factor analysis model be $$\Sigma = \Omega(\beta\Phi\beta^\prime + \Theta)\Omega$$ By default, the loadings methods extract the estimate of $beta$, the cormat methods extract the estimate of $Phi$, and the uniquenesses methods extract the diagonal of $Theta$. In addition, the coef methods and the loadings methods that are defined for objects restrictions-class extract the primary pattern matrix (at level 1).

At the moment there is no special function to get the diagonal of $Omega$, which is a diagonal matrix of estimated standard deviations of the manifest variables. However, they can be extracted from the appropriate slot using the @ operator. Also, if standardized = FALSE in the call to loadings or uniquenesses, then the loadings or uniquenesses are scaled by these estimated standard deviations to produce estimates on the covariance metric.

Additionally, for the loadings and cormat methods that are defined on objects of FA-class, the matrix argument can be specified to extract a different set of estimated coefficients or correlations. By default, matrix = "PP" for these loadings methods, indicating that the primary pattern matrix should be extracted. Other possible choices are "PS" to extract the primary structure matrix (defined as $beta Phi$), "RS" to extract the reference structure matrix (which is column-wise proportional to $beta$), "RP" to extract the reference pattern matrix (which is column-wise proportional to $beta Phi$), and "FC" to extract the factor contribution matrix (which is defined as $beta * (beta Phi)$, where the * indicates element-by-element multiplication of two matrices with the same dimensions).

By default, matrix = "PF" for these cormat methods, indicating that the correlation matrix among primary factors should be extracted. Other possible choices are "RF" to extract the correlation matrix among reference factors and "PR" to extract the (diagonal) correlation matrix between primary and reference factors.

In the case of a two-level model, the level argument can be specified to extract such matrices from the second level of the model (including the methods for the uniquenesses generic).

Examples

Run this code
  ## See the example for Factanal()

Run the code above in your browser using DataLab