corEFA: Exploratory Factor Analysis and Multiple Indicator...

corEFAR Documentation

Exploratory Factor Analysis and Multiple Indicator Measurement Model

Description

Abbreviation: efa

A maximum likelihood exploratory factor analysis of an input correlation matrix, provided by the standard R exploratory factor analysis factanal, which requires the specified number of factors as an input to the analysis. Then constructs the code to run the corresponding multiple indicator measurement model (MIMM) suggested by the exploratory factor analysis loadings in terms of both the lessR corCFA and the cfa function from the lavaan package.

Usage

corEFA(R=mycor, n_factors, rotate=c("promax", "varimax", "none"),
          min_loading=.2, sort=TRUE, ...)

efa(...)

Arguments

R

Correlation matrix.

n_factors

Number of factors.

rotate

Rotation method, if any. Choices are promax (obique) or varimax (orthogonal.

min_loading

Minimum loading to include in suggested factor for confirmatory analysis and for the display of the loadings for the exploratory analysis. To ignore, set to 0.

sort

Sort the input variables by their highest factor loadings (but only first just list those items with loadings larger than 0.5).

...

Parameter values_

Details

Only the loadings from the exploratory factor analysis are provided, with either an oblique (promax), by default, or an orthogonal (varimax) rotation. If more information is desired, run factanal directly.

Also provides the associated multiple indicator measurement model suggested by the exploratory factor analysis. Each MIMM factor is defined by the items that have the highest loading on the corresponding exploratory factor.

For versions of lessR including and after 4.4.3, the correlation matrix computed by Correlation is now the object returned if show is equal to "cor", the default, or a missing data analysis if equal to "missing".

Value

The output can optionally be returned and saved into an R object, otherwise it simply appears at the console. The components of this object are of two different types: pieces of text that form the readable output, and a variety of statistics. The readable output are character strings such as tables amenable for viewing and interpretation. The statistics are numerical values amenable for further analysis. The name of each piece, preceded by the name of the saved object followed by a dollar sign, can be referenced directly, such as in a subsequent R markdown document.

READABLE OUTPUT
out_title_efa: Title for the exploratory factor analysis
out_type: Extraction method and, for more than one factor, the rotation
out_loadings: Factor loadings, with values between plus and minus min_loading suppressed
out_ss: Sum of squared loadings for each factor, with proportion and cumulative variance
out_title_cfa: Title for the suggested confirmatory model code
out_cfa_code: Generated lessR and lavaan code for the suggested measurement model
out_deleted: Items with no loading larger than min_loading, deleted from the suggested model

STATISTICS
converged: Logical, whether the maximum likelihood extraction converged
n_factors: Number of factors extracted
ss_factors: Sum of squared loadings for each factor
loadings: Matrix of factor loadings
call: The function call

Although not typically needed for analysis, if the output is assigned to an object named, for example, fa, then the complete contents of the object can be viewed directly with the unclass function, here as unclass(fa). Invoking the class function on the saved object reveals a class of out_all. The class of each of the text pieces of output is out.

Author(s)

David W. Gerbing (Portland State University; gerbing@pdx.edu)

References

Gerbing, D. W. (2014). R Data Analysis without Programming, Chapter 11, NY: Routledge.

Yves Rosseel (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2), 1-36. URL http://www.jstatsoft.org/v48/i02/.

See Also

Correlation.

Examples

# input correlation matrix of perfect two-factor model
# Factor Pattern for each Factor: 0.8, 0.6, 0.4
# Factor-Factor correlation: 0.3
mycor <- matrix(nrow=6, ncol=6, byrow=TRUE,
c(1.000,0.480,0.320,0.192,0.144,0.096,
  0.480,1.000,0.240,0.144,0.108,0.072,
  0.320,0.240,1.000,0.096,0.072,0.048,
  0.192,0.144,0.096,1.000,0.480,0.320,
  0.144,0.108,0.072,0.480,1.000,0.240,
  0.096,0.072,0.048,0.320,0.240,1.000))
colnames(mycor) <- c("X1", "X2", "X3", "X4", "X5", "X6")
rownames(mycor) <- colnames(mycor) 

# default factor analysis of default correlation matrix mycor
#   with two factors extracted
corEFA(n_factors=2)

# abbreviated form
# use all items to construct the MIMM, regardless of their loadings
#  and show all loadings
# show the initial factor extraction
efa(n_factors=2, min_loading=0, show_initial=TRUE)

lessR documentation built on June 21, 2026, 5:06 p.m.