What it is
Principal component analysis (PCA) constructs a weighted composite of multiple variables by finding the linear combination that explains the largest share of variance in the full variable set. Applied to a battery of related indicators — asset holdings, test score subtests, infrastructure measures — it produces a single score (the first principal component) that captures the dominant shared dimension across all variables, with weights determined by the data rather than the researcher.
PCA is widely used in development economics to construct welfare indices from asset data when consumption is unavailable, to aggregate multiple test score dimensions into a single learning measure, and to build composite indices from survey batteries where the items are theorised to reflect a common underlying construct. The approach is entirely data-driven: weights are chosen to maximise explained variance, not to reflect any prior theory about the relative importance of variables.
When to use it
PCA is appropriate when: a set of correlated variables are theorised to reflect a common underlying dimension; no theoretically motivated weights exist; and the goal is a parsimonious summary rather than a causal decomposition of the components.
The most common field application is the asset-based wealth index pioneered by Filmer and Pritchett (2001), who use PCA on household asset variables as a proxy for economic status when consumption data are unavailable. Vyas and Kumaranayake (2006) evaluate the asset-based PCA index against consumption measures in developing country data. DHS surveys use a variant of this approach to construct their standard wealth index across dozens of countries.
PCA is less appropriate when the variables being combined have different scales, when the goal is to measure multiple distinct constructs (factor analysis is better for that — the EFA guide), or when equal weighting or theoretically motivated weights are preferable. It is also not appropriate when items are binary and correlated — polychoric PCA is needed in that case.
How it works
PCA finds orthogonal linear combinations (principal components) of the input variables that successively maximise explained variance. The first principal component has the highest eigenvalue and explains the most variance; subsequent components are orthogonal to prior ones and explain progressively less.
For index construction, the first principal component is used. Each input variable has a loading — its weight in the first component — reflecting how strongly it contributes to the shared dimension. Variables that cluster together in the data receive large loadings; variables that are uncorrelated with the rest receive small loadings.
The steps in practice:
- Standardise all variables to mean 0, standard deviation 1 (essential if variables are on different scales).
- Run PCA on the standardised variables.
- Extract the first component’s scoring coefficients.
- Compute each observation’s score as the weighted sum of standardised variable values, using the scoring coefficients.
The proportion of total variance explained by the first component is reported as a measure of how well it summarises the underlying battery. For a tight set of correlated variables, the first component may explain 60–80% of variance; for a loosely related battery, it may explain only 20–30%.
Key decisions
Variable selection. Only include variables that are theorised to reflect the same underlying dimension. Mixing indicators of different constructs — assets alongside survey attitudes, or test scores alongside attendance — produces a first component that is difficult to interpret and may be dominated by the most variable item in the set. Pre-selecting theoretically coherent variable sets improves interpretability.
Handling missing data. PCA requires complete cases by default. Listwise deletion of observations with any missing variable inflates attrition if missingness is high. Imputing missing values before PCA (mean imputation or multiple imputation) or using pairwise deletion are alternatives, each with tradeoffs. The sensitivity of the index to the missing data approach should be checked.
Binary and ordinal variables. Standard PCA assumes continuous, normally distributed variables. For binary or ordinal variables — which dominate asset indices — polychoric PCA (using the polychoric correlation matrix as input) produces more appropriate loadings. In practice, standard PCA on binary asset variables performs comparably to polychoric PCA for most applications, but the distinction matters when the binary variables have very skewed distributions.
Number of components. Using only the first component is standard for index construction. Kaiser’s rule (retain components with eigenvalue > 1) and scree plots (look for the “elbow” in the eigenvalue sequence) are used to assess how many components are needed to represent the full battery. If multiple components are needed to describe the data, the battery may be measuring more than one construct — consider separate indices or factor analysis.
Standardising the final index. The raw first-component scores are on an arbitrary scale. They are typically standardised (mean 0, SD 1) relative to the baseline or comparison group for interpretability. Ensure that standardisation is applied consistently — standardising relative to the full sample vs. a reference group produces different scales.
Caveats & common mistakes
PCA scores are not estimates of a latent variable. PCA is a dimensionality reduction technique, not a latent variable model. The first component is the linear combination that maximises variance, not the best estimate of an underlying construct. If there is genuine interest in recovering a latent construct with measurement error, factor analysis or IRT is more appropriate.
Sensitivity to variable set. PCA weights depend on the full correlation structure of the variable set. Adding or removing a single variable changes all weights. This means that indices computed on different surveys, or with slightly different variable sets, are not directly comparable. Cross-wave or cross-site comparability requires using the same variable set and, ideally, the same scoring coefficients.
Negative loadings. If some variables are negatively correlated with the first component — meaning higher values of those variables are associated with lower scores on the index — the component may be difficult to interpret. This can happen when variables are inadvertently coded in opposite directions. Checking all loadings for sign consistency before using the index is important.
Explained variance is not reliability. A high proportion of variance explained by the first component indicates that the variables are highly correlated, but it does not mean the index is a reliable measure of the true underlying construct. Cronbach’s alpha or test-retest reliability provide complementary evidence on reliability.
Analysis Guide
# asset_1 to asset_10: binary asset ownership variables
import pandas as pd
import numpy as np
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
import statsmodels.formula.api as smf
asset_cols = [f"asset_{i}" for i in range(1, 11)]
# 1. Standardise each variable to mean 0, SD 1 — required when inputs are on different scales; ensures that high-variance variables do not dominate the first component simply because of scale
df_std = StandardScaler().fit_transform(df[asset_cols])
# 2. Run PCA — extracts linear combinations of the asset variables ordered by descending variance explained; the first component captures the single dominant shared dimension across all assets and becomes the composite index
pca = PCA(n_components=3).fit(df_std)
print(pca.explained_variance_ratio_) # variance explained by each component
# Scree plot: visual check of eigenvalue drop-off — a sharp elbow after component 1 confirms a single dominant dimension
# import matplotlib.pyplot as plt; plt.plot(pca.explained_variance_, marker="o")
# 3. Score each observation on the first component — projects standardised variables onto the first component's loadings; this is the raw composite index before final standardisation
df["pca_index"] = pca.transform(df_std)[:, 0]
# 4. Standardise the index to mean 0, SD 1 — puts the index on an interpretable scale so regression coefficients represent standard-deviation-unit effects on the composite
df["pca_std"] = (df["pca_index"] - df["pca_index"].mean()) / df["pca_index"].std()
# 5. Check loadings — all should carry the same sign; a negative loading means higher values of that variable are associated with a lower index score, which may indicate miscoding or a variable that does not belong in this index
loadings = pd.Series(pca.components_[0], index=asset_cols)
print(loadings)
# 6. Use in regression — pca_std is now a continuous outcome or control interpretable as SD units of the composite asset index
fit = smf.ols("outcome ~ pca_std + treatment + age + C(female)", data=df).fit(cov_type="HC1")
print(fit.summary()) Reading the output
- The first principal component should explain at least 30–40% of total variance for the index to be a useful summary; below 25% suggests the variable set is not capturing a single coherent dimension.
- Inspect all loadings from
pca.components_[0]/pca_result$rotation[, 1]: loadings should all have the same sign; a negative loading on any variable means higher values of that variable are associated with a lower index score — verify this is theoretically coherent or recode the variable before re-running. - The scree plot should show a clear elbow after the first component. If the second eigenvalue is nearly as large as the first, the battery is likely measuring two distinct constructs; consider separate indices or factor analysis.
- After standardising the final index (mean 0, SD 1), the regression coefficient is interpretable as a standard deviation change in the composite index per unit change in the predictor.
References
Filmer, D., & Pritchett, L. H. (2001). Estimating wealth effects without expenditure data — or tears: An application to educational enrolments in states of India. Demography, 38(1), 115–132. https://doi.org/10.1353/dem.2001.0003
Filmer, D., & Scott, K. (2012). Assessing asset indices. Demography, 49(1), 359–392. https://doi.org/10.1007/s13524-011-0077-5
Jolliffe, I. T. (2002). Principal Component Analysis (2nd ed.). Springer.
Vyas, S., & Kumaranayake, L. (2006). Constructing socio-economic status indices: How to use principal components analysis. Health Policy and Planning, 21(6), 459–468. https://doi.org/10.1093/heapol/czl029