- Introduced by
- Principal-component regression literature (Jolliffe and others)
- Year
- 1982
- Type
- Unsupervised dimension reduction + regression
What does it do?
Principal components regression (PCR) first compresses a set of correlated predictors into a few principal components, the directions of greatest variance, and then regresses the response on those components.
Discarding low-variance directions stabilizes estimation when predictors are collinear or numerous, but the components are chosen without reference to the response.
The intuition behind the method
When predictors are highly correlated, ordinary least squares becomes unstable: small changes in the data can shift the coefficients substantially. PCR replaces the original predictors with a small number of uncorrelated principal components that summarise most of their variation, and regresses the response on those components. Because the components are orthogonal and few in number, the regression is better conditioned. The trade-off is that components are selected only by how much the predictors vary. A direction with little predictor variance is dropped even if it predicts the response well, so PCR works best when the high-variance directions are also the ones that matter for the response.
History
Regressing on principal components has long been used as a remedy for multicollinearity, and the approach predates 1982. Jolliffe's 1982 note in the Journal of the Royal Statistical Society: Series C addressed a growing misconception that components with small eigenvalues are rarely useful in regression. Using four examples, three already in the literature, he showed that such components can be as important as those with large variance. The implication is that component selection deserves care rather than simply keeping the largest-variance directions, which motivates choosing the number of components by prediction error. The Elements of Statistical Learning treats PCR as one of the methods using derived input directions, and compares it with ridge regression and partial least squares.
When to use it
Use PCR when predictors are strongly collinear or numerous, and you want a simple, stable linear model built on a few directions of predictor variation. It is closely related to ridge regression, since both operate on the principal components and downweight low-variance directions, ridge smoothly by shrinkage and PCR by hard truncation. It is a natural baseline alongside PLS. Be cautious when the response may depend on a low-variance direction of the predictors: because component selection ignores the response, such a direction may be discarded. In that case PLS, which builds components using the response, may need fewer components, so compare PCR and PLS by cross-validation on the same folds. Standardize predictors before applying it, since the components are sensitive to predictor scale.
Limitations and considerations
- Component selection uses predictor variance only, so a low-variance direction that predicts the response can be discarded.
- Because the components are built without the response, PCR may need more components than PLS when the response depends on low-variance directions; compare both by cross-validation.
- Results depend on predictor scaling, which must be set before PCA is run.
- The retained components are linear combinations of many original predictors, which makes their substantive meaning harder to interpret.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Stabilizes regression under strong multicollinearity because the retained components are orthogonal.
- Reduces the number of effective regression terms, which helps when predictors are many relative to observations.
- Rests on PCA, whose variance-explained summaries show how much predictor variation each retained component captures.
- Its link to ridge regression gives a clear conceptual reference point for the shrinkage it performs.
Applications
- Regression with many correlated predictors, such as economic indicators or sensor arrays.
- Chemometric and spectroscopic calibration, often as a baseline against PLS.
- Stabilizing models when predictors are numerous relative to the number of observations.
- Dimensionality reduction before regression in exploratory modelling.
- Teaching the connection between PCA, ridge regression, and shrinkage.
How it works
How it works
Standardize the predictors, then apply principal component analysis. With standardized (centred) predictors, the eigenvectors of X^T X, equivalently of the sample covariance or correlation matrix, define the directions V. Projecting the data onto them gives orthogonal component scores z_m = X v_m, ordered by the variance they explain.
Formula
Z = X V,\quad V \text{ from eigendecomposition of } X^\top XKeep the top m components, those capturing the most predictor variance, and discard the p - m components with the smallest eigenvalues. Removing the low-variance directions is what reduces the ill-conditioning caused by multicollinearity. The value of m is the tuning parameter of the method; with m = p the fit reproduces ordinary least squares.
Formula
Z_m = [z_1, \ldots, z_m],\ \text{top } m \text{ components by variance}Regress the response on the m retained components by ordinary least squares. Because the components are orthogonal, this regression is a sum of univariate regressions, with each coefficient given by theta_m = <z_m, y> / <z_m, z_m>. The coefficients are therefore uncorrelated, and the fit avoids the variance inflation that regressing on collinear original predictors would produce.
Formula
\hat\theta = (Z_m^\top Z_m)^{-1} Z_m^\top yMap the component coefficients back through the PCA loadings, beta = V_m theta, to express the model in terms of the original predictors. These coefficients are on the standardized predictor scale. To predict from raw data, apply the training means and standard deviations (and add back the training mean of the response), or equivalently compute the components for new observations using the training-set loadings. The value of m is typically chosen by cross-validation, which balances bias against variance.
Formula
\hat\beta_{\text{PCR}} = V_m\,\hat\thetaCommon pitfalls
- Keeping components by variance alone and so dropping a low-variance direction that actually predicts the response.
- Running PCA without standardizing predictors, which lets variables with large scales dominate the components.
- Fitting PCA on the full dataset before cross-validation, so that information from the held-out folds leaks into the component directions. The PCA step should be refitted within each training fold.
- Choosing the number of components arbitrarily rather than by cross-validated prediction error.
- Calling PCR supervised dimension reduction. Supervised component construction is the defining feature of PLS, not PCR.
Frequently asked questions
How does PCR differ from PLS?
PCR selects components by predictor variance alone, without reference to the response, and then regresses on them. PLS selects components that maximize covariance with the response. As a result, PCR can discard low-variance directions that predict the response well, whereas PLS keeps response-relevant directions and often needs fewer components.
How is PCR related to ridge regression?
Both reduce the influence of low-variance directions of the predictors. PCR does this abruptly by keeping the top components and dropping the rest, while ridge regression shrinks all directions continuously, with the strongest shrinkage applied to low-variance directions. Neither is uniformly better; PCR discards those directions entirely, whereas ridge retains some information from them.
How many components should I keep?
Choose the number of principal components by cross-validation, selecting the count that minimizes cross-validated prediction error, with the PCA refitted within each training fold. Keeping too few components omits useful variation, while keeping too many reintroduces the instability PCR is meant to avoid.
Related methods
Sources
Jolliffe, I. T. (1982). A note on the use of principal components in regression. Journal of the Royal Statistical Society: Series C (Applied Statistics), 31(3), 300–303.
Open DOI referenceHastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning (2nd ed.). Springer.
ISBN: 978-0-387-84857-0