Learn R Programming

EFA.dimensions (version 0.1.7.7)

MAXLIKE_FA: Maximum likelihood factor analysis

Description

Maximum likelihood factor analysis

Usage

MAXLIKE_FA(data, corkind, Nfactors=NULL, Ncases=NULL, rotate, ppower, verbose)

Value

A list with the following elements:

totvarexplNOROT

The eigenvalues and total variance explained

totvarexplROT

The rotation sums of squared loadings and total variance explained for the rotated loadings

loadingsNOROT

The unrotated factor loadings

loadingsROT

The rotated factor loadings (for varimax rotation)

structure

The structure matrix (for promax rotation)

pattern

The pattern matrix (for promax rotation)

correls

The correlations between the factors (for promax rotation)

cormat_reproduced

The reproduced correlation matrix, based on the rotated loadings

chisqMODEL

The model chi square statistic

dfMODEL

The model degrees of freedom

pvalue

The model p-value

fit_coefficients

Model fit coefficients

Arguments

data

An all-numeric dataframe where the rows are cases & the columns are the variables, or a correlation matrix with ones on the diagonal.The function internally determines whether the data are a correlation matrix.

corkind

The kind of correlation matrix to be used if data is not a correlation matrix. The options are 'pearson', 'kendall', 'spearman', 'gamma', and 'polychoric'. Required only if the entered data is not a correlation matrix.

Nfactors

The number of factors to extract.

Ncases

The number of cases. Required only if data is a correlation matrix.

rotate

The factor rotation method. The options are: 'PROMAX', 'VARIMAX', and 'none'.

ppower

The power value to be used in a promax rotation (required only if rotate = 'PROMAX'). Suggested value: 3

verbose

Should detailed results be displayed in console? TRUE (default) or FALSE

Author

Brian P. O'Connor

Details

This function relies heavily on the R factanal function, and it uses the fa from the psych package when factanal produces an error.

References

Reyment, R., Joreskog, K., & Marcus, L. F. (1996). Applied Factor Analysis in the Natural Sciences. Cambridge, MA: Cambridge University Press.

Examples

Run this code
# \donttest{
# the Harman (1967) correlation matrix
MAXLIKE_FA(data_Harman, Nfactors = 2, Ncases = 305,
           rotate='PROMAX', ppower = 4, verbose=TRUE)

# Rosenberg Self-Esteem scale items
MAXLIKE_FA(data_RSE, corkind='gamma', Nfactors = 2, 
           rotate='PROMAX', ppower = 4, verbose=TRUE)

# NEO-PI-R scales
MAXLIKE_FA(data_NEOPIR, corkind='pearson', Nfactors = 5, 
           rotate='PROMAX', ppower = 4, verbose=TRUE)
# }

Run the code above in your browser using DataLab