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(...,
factoran computes the maximum likelihood
estimate (MLE) of the factor loadings matrix Λ in the factor
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
where 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
X is an
where each row is an observation of
(i,j)th element of the
the coefficient, or loading, of the
ith variable. By default,
rotatefactors to rotate the estimated
factor loadings using the
[lambda,psi] = factoran(X,m) also
returns maximum likelihood estimates of the specific variances as
a column vector
psi of length
[lambda,psi,T] = factoran(X,m) also
m factor loadings
[lambda,psi,T,stats] = factoran(X,m) also
returns a structure
stats containing information
relating to the null hypothesis, H0, that the
number of common factors is
the following fields:
Maximized log-likelihood value
Error degrees of freedom =
Approximate chi-squared statistic for the null hypothesis
Right-tail significance level for the null hypothesis
factoran does not compute the
dfe is positive and all the specific variance
psi are positive (see Heywood Case below). If
a covariance matrix, then you must also specify the
if you want
factoran to compute the
[lambda,psi,T,stats,F] = factoran(X,m) also
F, predictions of the common factors,
known as factor scores.
F is an
where each row is a prediction of
m common factors.
X is a covariance matrix,
the same criterion as for
[...] = factoran(..., enables
you to specify optional parameter name/value pairs to control the
model fit and the outputs. The following are the valid parameter/value
Type of input in the matrix
Raw data (default)
Positive definite covariance or correlation matrix
Method for predicting factor
Synonyms for a weighted least-squares estimate that treats
Synonyms for a minimum mean squared error prediction that is equivalent to a ridge regression
Starting point for the specific
Chooses the starting vector as a scale factor times
Performs the given number of maximum likelihood fits,
each initialized as with
Performs one maximum likelihood fit for each column of
the specified matrix. The
Method used to rotate factor
loadings and scores.
Performs no rotation.
Orthogonal rotation that maximizes a criterion based on the variance of the loadings.
Performs either an oblique rotation (the default) or
an orthogonal rotation to best match a specified pattern matrix. Use
Performs either an oblique (the default) or an orthogonal rotation to best match a specified target matrix in the least squares sense.
Performs an oblique procrustes rotation to a target matrix
Function handle to rotation function of the form
[B,T] = myrotation(A,...)
Coefficient, often denoted
as γ, defining the specific
Flag indicating whether
the loading matrix should be row-normalized (1) or left unnormalized
Relative convergence tolerance
Iteration limit for
Target factor loading matrix
Exponent for creating the
target matrix in the
Denotes the beginning of
additional input values for a user-defined rotation function.
Lower bound for the specific
Structure that specifies
control parameters for the iterative algorithm the function uses to
compute maximum likelihood estimates. Create this structure with the
Load the sample data.
Define the variable matrix.
X = [Acceleration Displacement Horsepower MPG Weight]; X = X(all(~isnan(X),2),:);
Estimate the factor loadings using a minimum mean squared error prediction for a factor analysis with two common factors.
[Lambda,Psi,T,stats,F] = factoran(X,2,'scores','regression'); inv(T'*T); % Estimated correlation matrix of F, == eye(2) Lambda*Lambda' + diag(Psi); % Estimated correlation matrix Lambda*inv(T); % Unrotate the loadings F*T'; % Unrotate the factor scores
Create biplot of two factors.
Estimate the factor loadings using the covariance (or correlation) matrix.
[Lambda,Psi,T] = factoran(cov(X),2,'xtype','cov') % [Lambda,Psi,T] = factoran(corrcoef(X),2,'xtype','cov')
Lambda = -0.2432 -0.8500 0.8773 0.3871 0.7618 0.5930 -0.7978 -0.2786 0.9692 0.2129 Psi = 0.2184 0.0804 0.0680 0.2859 0.0152 T = 0.9476 0.3195 0.3195 -0.9476
Although the estimates are the same, the use of a covariance matrix rather than raw data doesn't let you request scores or significance level.
Use promax rotation.
[Lambda,Psi,T,stats,F] = factoran(X,2,'rotate','promax',... 'powerpm',4); inv(T'*T) % Estimated correlation of F, % no longer eye(2) Lambda*inv(T'*T)*Lambda'+diag(Psi) % Estimated correlation of X
ans = 1.0000 -0.6391 -0.6391 1.0000 ans = 1.0000 -0.5424 -0.6893 0.4309 -0.4167 -0.5424 1.0000 0.8979 -0.8078 0.9328 -0.6893 0.8979 1.0000 -0.7730 0.8647 0.4309 -0.8078 -0.7730 1.0000 -0.8326 -0.4167 0.9328 0.8647 -0.8326 1.0000
Plot the unrotated variables with oblique axes superimposed.
invT = inv(T); Lambda0 = Lambda*invT; figure() line([-invT(1,1) invT(1,1) NaN -invT(2,1) invT(2,1)], ... [-invT(1,2) invT(1,2) NaN -invT(2,2) invT(2,2)], ... 'Color','r','linewidth',2) grid on hold on biplot(Lambda0,'LineWidth',2,'MarkerSize',20) xlabel('Loadings for unrotated Factor 1') ylabel('Loadings for unrotated Factor 2')
Plot the rotated variables against the oblique axes.
Syntax for passing additional arguments to a user-defined rotation function:
[Lambda,Psi,T] = ... factoran(X,2,'rotate',@myrotation,'userargs',1,'two');
The variables in the observed data matrix
be linearly independent, i.e.,
cov(X) must have
full rank, for maximum likelihood estimation to succeed.
both raw data and a covariance matrix to a correlation matrix before
performing the fit.
factoran standardizes the observed data
zero mean and unit variance before estimating the loadings
This does not affect the model fit, because MLEs in this model are
invariant to scale. However,
returned in terms of the standardized variables, i.e.,
an estimate of the correlation matrix of the original data
not after an oblique rotation). See Estimate and Plot Factor Loadings and User-Defined Rotation Function.
If elements of
psi are equal to the value
'delta' parameter (i.e., they are essentially
zero), the fit is known as a Heywood case, and interpretation of the
resulting estimates is problematic. In particular, there can be multiple
local maxima of the likelihood, each with different estimates of the
loadings and the specific variances. Heywood cases can indicate overfitting
m is too large), but can also be the result
Unless you explicitly specify no rotation using the
the estimated factor loadings,
lambda, and the
F. The output matrix
used to rotate the loadings, i.e.,
lambda = lambda0*T, where
the initial (unrotated) MLE of the loadings.
T is an orthogonal matrix for orthogonal rotations, and
the identity matrix for no rotation. The inverse of
known as the primary axis rotation matrix, while
is related to the reference axis rotation matrix. For orthogonal rotations,
the two are identical.
factoran computes factor scores that have
been rotated by
F = F0 * inv(T'),
F0 contains the unrotated predictions. The
estimated covariance of
which, for orthogonal or no rotation, is the identity matrix. Rotation
of factor loadings and scores is an attempt to create a more easily
interpretable structure in the loadings matrix after maximum likelihood
 Harman, H. H. Modern Factor Analysis. 3rd Ed. Chicago: University of Chicago Press, 1976.
 Jöreskog, K. G. "Some Contributions to Maximum Likelihood Factor Analysis." Psychometrika. Vol. 32, Issue 4, 1967, pp. 443–482.
 Lawley, D. N., and A. E. Maxwell. Factor Analysis as a Statistical Method. 2nd Ed. New York: American Elsevier Publishing Co., 1971.