Documentation |
Factor analysis
lambda = factoran(X,m)
[lambda,psi] = factoran(X,m)
[lambda,psi,T] = factoran(X,m)
[lambda,psi,T,stats] = factoran(X,m)
[lambda,psi,T,stats,F] = factoran(X,m)
[...] = factoran(...,param1,val1,param2,val2,...)
factoran computes the maximum likelihood estimate (MLE) of the factor loadings matrix Λ in the factor analysis model
$$x=\mu +\Lambda f+e$$
where x is a vector of observed variables, μ is a constant vector of means, Λ is a constant d-by-m matrix of factor loadings, f is a vector of independent, standardized common factors, and e is a vector of independent specific factors. x, μ, and e are of length d. f is of length m.
Alternatively, the factor analysis model can be specified as
$$\mathrm{cov}(x)=\Lambda {\Lambda}^{T}+\Psi $$
where $$\Psi =\mathrm{cov}(e)$$ is a d-by-d diagonal matrix of specific variances.
lambda = factoran(X,m) returns the maximum likelihood estimate, lambda, of the factor loadings matrix, in a common factor analysis model with m common factors. X is an n-by-d matrix where each row is an observation of d variables. The (i,j)th element of the d-by-m matrix lambda is the coefficient, or loading, of the jth factor for the ith variable. By default, factoran calls the function rotatefactors to rotate the estimated factor loadings using the 'varimax' option.
[lambda,psi] = factoran(X,m) also returns maximum likelihood estimates of the specific variances as a column vector psi of length d.
[lambda,psi,T] = factoran(X,m) also returns the m-by-m factor loadings rotation matrix T.
[lambda,psi,T,stats] = factoran(X,m) also returns a structure stats containing information relating to the null hypothesis, H_{0}, that the number of common factors is m. stats includes the following fields:
Field | Description |
---|---|
loglike | Maximized log-likelihood value |
dfe | Error degrees of freedom = ((d-m)^2 - (d+m))/2 |
chisq | Approximate chi-squared statistic for the null hypothesis |
p | Right-tail significance level for the null hypothesis |
factoran does not compute the chisq and p fields unless dfe is positive and all the specific variance estimates in psi are positive (see Heywood Case below). If X is a covariance matrix, then you must also specify the 'nobs' parameter if you want factoran to compute the chisq and p fields.
[lambda,psi,T,stats,F] = factoran(X,m) also returns, in F, predictions of the common factors, known as factor scores. F is an n-by-m matrix where each row is a prediction of m common factors. If X is a covariance matrix, factoran cannot compute F. factoran rotates F using the same criterion as for lambda.
[...] = factoran(...,param1,val1,param2,val2,...) enables you to specify optional parameter name/value pairs to control the model fit and the outputs. The following are the valid parameter/value pairs.
Parameter | Value | |
---|---|---|
'xtype' | Type of input in the matrix X. 'xtype' can be one of: | |
'data' | Raw data (default) | |
Positive definite covariance or correlation matrix | ||
'scores' | Method for predicting factor scores. 'scores' is ignored if X is not raw data. | |
Synonyms for a weighted least-squares estimate that treats F as fixed (default) | ||
Synonyms for a minimum mean squared error prediction that is equivalent to a ridge regression | ||
'start' | Starting point for the specific variances psi in the maximum likelihood optimization. Can be specified as: | |
Chooses d uniformly distributed values on the interval [0,1]. | ||
Chooses the starting vector as a scale factor times diag(inv(corrcoef(X))) (default). For examples, see Jöreskog [2]. | ||
Positive integer | Performs the given number of maximum likelihood fits, each initialized as with 'random'. factoran returns the fit with the highest likelihood. | |
Matrix | Performs one maximum likelihood fit for each column of the specified matrix. The ith optimization is initialized with the values from the ith column. The matrix must have d rows. | |
'rotate' | Method used to rotate factor loadings and scores. 'rotate' can have the same values as the 'Method' parameter of rotatefactors. See the reference page for rotatefactors for a full description of the available methods. | |
Performs no rotation. | ||
Special case of the orthomax rotation. Use the 'normalize', 'reltol', and 'maxit' parameters to control the details of the rotation. | ||
Orthogonal rotation that maximizes a criterion based on the variance of the loadings. Use the 'coeff', 'normalize', 'reltol', and 'maxit' parameters to control the details of the rotation. | ||
Special case of the orthomax rotation (default). Use the 'normalize', 'reltol', and 'maxit' parameters to control the details of the rotation. | ||
Performs either an oblique rotation (the default) or an orthogonal rotation to best match a specified pattern matrix. Use the 'type' parameter to choose the type of rotation. Use the 'target' parameter to specify the pattern matrix. | ||
Performs either an oblique (the default) or an orthogonal rotation to best match a specified target matrix in the least squares sense. Use the 'type' parameter to choose the type of rotation. Use 'target' to specify the target matrix. | ||
Performs an oblique procrustes rotation to a target matrix determined by factoran as a function of an orthomax solution. Use the 'power' parameter to specify the exponent for creating the target matrix. Because 'promax' uses 'orthomax' internally, you can also specify the parameters that apply to 'orthomax'. | ||
Special case of the orthomax rotation (default). Use the 'normalize', 'reltol', and 'maxit' parameters to control the details of the rotation. | ||
Special case of the orthomax rotation (default). Use the 'normalize', 'reltol', and 'maxit' parameters to control the details of the rotation. | ||
Function | Function handle to rotation function of the form [B,T] = myrotation(A,...) where A is a d-by-m matrix of unrotated factor loadings, B is a d-by-m matrix of rotated loadings, and T is the corresponding m-by-m rotation matrix. Use the factoran parameter 'userargs' to pass additional arguments to this rotation function. See User-Defined Rotation Function. | |
'coeff' | Coefficient, often denoted as γ, defining the specific 'orthomax' criterion. Must be from 0 to 1. The value 0 corresponds to quartimax, and 1 corresponds to varimax. Default is 1. | |
'normalize' | Flag indicating whether the loading matrix should be row-normalized (1) or left unnormalized (0) for 'orthomax' or 'varimax' rotation. Default is 1. | |
'reltol' | Relative convergence tolerance for 'orthomax' or 'varimax' rotation. Default is sqrt(eps). | |
'maxit' | Iteration limit for 'orthomax' or 'varimax' rotation. Default is 250. | |
'target' | Target factor loading matrix for 'procrustes' rotation. Required for 'procrustes' rotation. No default value. | |
'type' | Type of 'procrustes' rotation. Can be 'oblique' (default) or 'orthogonal'. | |
'power' | Exponent for creating the target matrix in the 'promax' rotation. Must be ≥ 1. Default is 4. | |
'userargs' | Denotes the beginning of additional input values for a user-defined rotation function. factoran appends all subsequent values, in order and without processing, to the rotation function argument list, following the unrotated factor loadings matrix A. See User-Defined Rotation Function. | |
'nobs' | If X is a covariance or correlation matrix, indicates the number of observations that were used in its estimation. This allows calculation of significance for the null hypothesis even when the original data are not available. There is no default. 'nobs' is ignored if X is raw data. | |
'delta' | Lower bound for the specific variances psi during the maximum likelihood optimization. Default is 0.005. | |
'optimopts' | Structure that specifies control parameters for the iterative algorithm the function uses to compute maximum likelihood estimates. Create this structure with the function statset. Enter statset('factoran') to see the names and default values of the parameters that factoran accepts in the options structure. See the reference page for statset for more information about these options. |
[1] Harman, H. H. Modern Factor Analysis. 3rd Ed. Chicago: University of Chicago Press, 1976.
[2] Jöreskog, K. G. "Some Contributions to Maximum Likelihood Factor Analysis." Psychometrika. Vol. 32, Issue 4, 1967, pp. 443–482.
[3] Lawley, D. N., and A. E. Maxwell. Factor Analysis as a Statistical Method. 2nd Ed. New York: American Elsevier Publishing Co., 1971.
biplot | pca | pcacov | procrustes | rotatefactors | statset