Lably
Skip to content

Factor analysis

Statistical method

  • 32 min read
  • 10 chapters

Related on Lably

Through Statistics, Variance and Variable (mathematics)

The correlation between a variable and a given factor, called the variable's factor loading, indicates the extent to which the two are related.

A common rationale behind factor analytic methods is that the information gained about the interdependencies between observed variables can be used later to reduce the set of variables in a dataset. Factor analysis is commonly used in psychometrics, personality psychology, biology, marketing, product management, operations research, finance, and machine learning. It may help to deal with data sets where there are large numbers of observed variables that are thought to reflect a smaller number of underlying/latent variables. It is one of the most commonly used inter-dependency techniques and is used when the relevant set of variables shows a systematic inter-dependence and the objective is to find out the latent factors that create a commonality.

Statistical model

Definition

The model attempts to explain a set of p observations in each of n individuals with a set of k common factors (fi,j) where there are fewer factors per unit than observations per unit (k<p). Each individual has k of their own common factors, and these are related to the observations via the factor loading matrix (L∈Rp×k), for a single observation, according to

xi,m−μi=li,1f1,m+⋯+li,kfk,m+εi,m

where

  • xi,m is the value of the ith observation of the mth individual,
  • μi is the observation mean for the ith observation,
  • li,j is the loading for the ith observation of the jth factor,
  • fj,m is the value of the jth factor of the mth individual, and
  • εi,m is the (i,m)th unobserved stochastic error term with mean zero and finite variance.

In matrix notation

X−M=LF+ε

where observation matrix X∈Rp×n, loading matrix L∈Rp×k, factor matrix F∈Rk×n, error term matrix ε∈Rp×n and mean matrix M∈Rp×n whereby the (i,m)th element is simply Mi,m=μi.

Also we will impose the following assumptions on F:

  1. F and ε are independent.
  2. E(F)=0; where E is Expectation
  3. Cov(F)=I where Cov is the covariance matrix, to make sure that the factors are uncorrelated, and I is the identity matrix.

Suppose Cov(X−M)=Σ. Then

Σ=Cov(X−M)=Cov(LF+ε),

and therefore, from conditions 1 and 2 imposed on F above, E[LF]=LE[F]=0 and Cov(LF+ϵ)=Cov(LF)+Cov(ϵ), giving

Σ=LCov(F)LT+Cov(ε),

or, setting Ψ:=Cov(ε),

Σ=LLT+Ψ.

For any orthogonal matrix Q, if we set L′=LQ and F′=QTF, the criteria for being factors and factor loadings still hold. Hence a set of factors and factor loadings is unique only up to an orthogonal transformation.

Example

Suppose a psychologist has the hypothesis that there are two kinds of intelligence, "verbal intelligence" and "mathematical intelligence", neither of which is directly observed. Evidence for the hypothesis is sought in the examination scores from each of 10 different academic fields of 1000 students. If each student is chosen randomly from a large population, then each student's 10 scores are random variables. The psychologist's hypothesis may say that for each of the 10 academic fields, the score averaged over the group of all students who share some common pair of values for verbal and mathematical "intelligences" is some constant times their level of verbal intelligence plus another constant times their level of mathematical intelligence, i.e., it is a linear combination of those two "factors". The numbers for a particular subject, by which the two kinds of intelligence are multiplied to obtain the expected score, are posited by the hypothesis to be the same for all intelligence level pairs, and are called "factor loading" for this subject. For example, the hypothesis may hold that the predicted average student's aptitude in the field of astronomy is

{10 × the student's verbal intelligence} + {6 × the student's mathematical intelligence}.

The numbers 10 and 6 are the factor loadings associated with astronomy. Other academic subjects may have different factor loadings.

Two students assumed to have identical degrees of verbal and mathematical intelligence may have different measured aptitudes in astronomy because individual aptitudes differ from average aptitudes (predicted above) and because of measurement error itself. Such differences make up what is collectively called the "error" — a statistical term that means the amount by which an individual, as measured, differs from what is average for or predicted by his or her levels of intelligence (see errors and residuals in statistics).

The observable data that go into factor analysis would be 10 scores of each of the 1000 students, a total of 10,000 numbers. The factor loadings and levels of the two kinds of intelligence of each student must be inferred from the data.

Mathematical model of the same example

In the following, matrices will be indicated by indexed variables. "Academic Subject" indices will be indicated using letters a,b and c, with values running from 1 to p which is equal to 10 in the above example. "Factor" indices will be indicated using letters p, q and r, with values running from 1 to k which is equal to 2 in the above example. "Instance" or "sample" indices will be indicated using letters i,j and k, with values running from 1 to N. In the example above, if a sample of N=1000 students participated in the p=10 exams, the ith student's score for the ath exam is given by xai. The purpose of factor analysis is to characterize the correlations between the variables xa of which the xai are a particular instance, or set of observations. In order for the variables to be on equal footing, they are normalized into standard scores z:

zai=xai−μ^aσ^a

where the sample mean is:

μ^a=1N∑ixai

and the sample variance is given by:

σ^a2=1N−1∑i(xai−μ^a)2

The factor analysis model for this particular sample is then:

z1,i=ℓ1,1F1,i+ℓ1,2F2,i+ε1,i⋮⋮⋮⋮z10,i=ℓ10,1F1,i+ℓ10,2F2,i+ε10,i

or, more succinctly:

zai=∑pℓapFpi+εai

where

  • F1i is the ith student's "verbal intelligence",
  • F2i is the ith student's "mathematical intelligence",
  • ℓap are the factor loadings for the ath subject, for p=1,2.

In matrix notation, we have

Z=LF+ε

Observe that by doubling the scale on which "verbal intelligence"—the first component in each column of F—is measured, and simultaneously halving the factor loadings for verbal intelligence makes no difference to the model. Thus, no generality is lost by assuming that the standard deviation of the factors for verbal intelligence is 1. Likewise for mathematical intelligence. Moreover, for similar reasons, no generality is lost by assuming the two factors are uncorrelated with each other. In other words:

∑iFpiFqi=δpq

where δpq is the Kronecker delta (0 when p≠q and 1 when p=q). The errors are assumed to be independent of the factors:

∑iFpiεai=0

Since any rotation of a solution is also a solution, this makes interpreting the factors difficult. See disadvantages below. In this particular example, if we do not know beforehand that the two types of intelligence are uncorrelated, then we cannot interpret the two factors as the two different types of intelligence. Even if they are uncorrelated, we cannot tell which factor corresponds to verbal intelligence and which corresponds to mathematical intelligence without an outside argument.

The values of the loadings L, the averages μ, and the variances of the "errors" ε must be estimated given the observed data X and F (the assumption about the levels of the factors is fixed for a given F). The "fundamental theorem" may be derived from the above conditions:

∑izaizbi=∑jℓajℓbj+∑iεaiεbi

The term on the left is the (a,b)-term of the correlation matrix (a p×p matrix derived as the product of the p×N matrix of standardized observations with its transpose) of the observed data, and its p diagonal elements will be 1s. The second term on the right will be a diagonal matrix with terms less than unity. The first term on the right is the "reduced correlation matrix" and will be equal to the correlation matrix except for its diagonal values which will be less than unity. These diagonal elements of the reduced correlation matrix are called "communalities" (which represent the fraction of the variance in the observed variable that is accounted for by the factors):

ha2=1−ψa=∑jℓajℓaj

The sample data zai will not exactly obey the fundamental equation given above due to sampling errors, inadequacy of the model, etc. The goal of any analysis of the above model is to find the factors Fpi and loadings ℓap which give a "best fit" to the data. In factor analysis, the best fit is defined as the minimum of the mean square error in the off-diagonal residuals of the correlation matrix:

ε2=∑a≠b[∑izaizbi−∑jℓajℓbj]2

This is equivalent to minimizing the off-diagonal components of the error covariance which, in the model equations have expected values of zero. This is to be contrasted with principal component analysis which seeks to minimize the mean square error of all residuals. Before the advent of high-speed computers, considerable effort was devoted to finding approximate solutions to the problem, particularly in estimating the communalities by other means, which then simplifies the problem considerably by yielding a known reduced correlation matrix. This was then used to estimate the factors and the loadings. With the advent of high-speed computers, the minimization problem can be solved iteratively with adequate speed, and the communalities are calculated in the process, rather than being needed beforehand. The MinRes algorithm is particularly suited to this problem, but is hardly the only iterative means of finding a solution.

If the solution factors are allowed to be correlated (as in 'oblimin' rotation, for example), then the corresponding mathematical model uses skew coordinates rather than orthogonal coordinates.

Geometric interpretation

The parameters and variables of factor analysis can be given a geometrical interpretation. The data (zai), the factors (Fpi) and the errors (εai) can be viewed as vectors in an N-dimensional Euclidean space (sample space), represented as za, Fp and εa respectively. Since the data are standardized, the data vectors are of unit length (||za||=1). The factor vectors define a k-dimensional linear subspace (i.e. a hyperplane) in this space, upon which the data vectors are projected orthogonally. This follows from the model equation

za=∑pℓapFp+εa

and the independence of the factors and the errors: Fp⋅εa=0. In the above example, the hyperplane is just a 2-dimensional plane defined by the two factor vectors. The projection of the data vectors onto the hyperplane is given by

z^a=∑pℓapFp

and the errors are vectors from that projected point to the data point and are perpendicular to the hyperplane. The goal of factor analysis is to find a hyperplane which is a "best fit" to the data in some sense, so it doesn't matter how the factor vectors which define this hyperplane are chosen, as long as they are independent and lie in the hyperplane. We are free to specify them as both orthogonal and normal (Fp⋅Fq=δpq) with no loss of generality. After a suitable set of factors are found, they may also be arbitrarily rotated within the hyperplane, so that any rotation of the factor vectors will define the same hyperplane, and also be a solution. As a result, in the above example, in which the fitting hyperplane is two dimensional, if we do not know beforehand that the two types of intelligence are uncorrelated, then we cannot interpret the two factors as the two different types of intelligence. Even if they are uncorrelated, we cannot tell which factor corresponds to verbal intelligence and which corresponds to mathematical intelligence, or whether the factors are linear combinations of both, without an outside argument.

The data vectors za have unit length. The entries of the correlation matrix for the data are given by rab=za⋅zb. The correlation matrix can be geometrically interpreted as the cosine of the angle between the two data vectors za and zb. The diagonal elements will clearly be 1s and the off diagonal elements will have absolute values less than or equal to unity. The "reduced correlation matrix" is defined as

r^ab=z^a⋅z^b.

The goal of factor analysis is to choose the fitting hyperplane such that the reduced correlation matrix reproduces the correlation matrix as nearly as possible, except for the diagonal elements of the correlation matrix which are known to have unit value. In other words, the goal is to reproduce as accurately as possible the cross-correlations in the data. Specifically, for the fitting hyperplane, the mean square error in the off-diagonal components

ε2=∑a≠b(rab−r^ab)2

is to be minimized, and this is accomplished by minimizing it with respect to a set of orthonormal factor vectors. It can be seen that

rab−r^ab=εa⋅εb

The term on the right is just the covariance of the errors. In the model, the error covariance is stated to be a diagonal matrix and so the above minimization problem will in fact yield a "best fit" to the model: It will yield a sample estimate of the error covariance which has its off-diagonal components minimized in the mean square sense. It can be seen that since the z^a are orthogonal projections of the data vectors, their length will be less than or equal to the length of the projected data vector, which is unity. The square of these lengths are just the diagonal elements of the reduced correlation matrix. These diagonal elements of the reduced correlation matrix are known as "communalities":

ha2=||z^a||2=∑pℓap2

Large values of the communalities will indicate that the fitting hyperplane is rather accurately reproducing the correlation matrix. The mean values of the factors must also be constrained to be zero, from which it follows that the mean values of the errors will also be zero.

Sign in to keep reading

9 more chapters are free with a Lably account.

More in Statistics