The magnitude of a regression coefficient \(\hat\beta_j\) reflects the units of measurement of the \(j\)th explanatory variable \(x_j\). Consider, for example, the fitted model
\[\hat y=5+x_1+1000x_2,\]
where \(y\) is measured in litres, \(x_1\) in litres and \(x_2\) in millilitres. Although \(\hat\beta_2\gg\hat\beta_1\), the effect of both regressors is identical: a change of one litre in either \(x_1\) or \(x_2\) (one litre of \(x_2\) being 1000 mL) makes the same change in \(\hat y\) when the other variable is held fixed. Raw coefficients therefore cannot be compared to decide which regressor is “more important”.
Scaling the explanatory variables (and the response) produces dimensionless regression coefficients. These are called standardized regression coefficients or beta coefficients(Montgomery, Peck, and Vining 2021). Two popular approaches to scaling give standardized regression coefficients: unit normal scaling and unit length scaling.
6.1 Unit normal scaling
Each regressor and the response are centred and divided by their sample standard deviations:
are the sample variances of the \(j\)th explanatory variable and of the study variable respectively. Each scaled variable has mean 0 and variance 1. The regression model in the scaled variables is
or \(\mathbf y^*=\mathbf Z\boldsymbol\gamma+\boldsymbol\varepsilon\). Centering removes the intercept term, since all variables have mean zero. The least squares estimate is
is the corrected sum of squares of the \(j\)th explanatory variable and \(SS_T=\sum_{i=1}^n(y_i-\bar y)^2\) is the total sum of squares. Each new explanatory variable \(w_j\) has mean
the vector of correlations between each explanatory variable and \(y\). So \(\hat{\boldsymbol\delta}=\mathbf R_{xx}^{-1}\mathbf r_{xy}\) can be computed from correlations alone.
6.3 Equivalence of the two scalings
If unit normal scaling is used, \(z_{ij}=w_{ij}\sqrt{n-1}\) and \(y_i^*=y_i^0\sqrt{n-1}\), so
Equivalently \(\hat\delta_j=b_j\,s_j/s_y\): a standardized coefficient is the change in \(y\), in standard deviations of \(y\), for a change of one standard deviation in \(x_j\), the other regressors held fixed.
Note
Standardized coefficients make the effects of regressors measured in different units comparable, but they depend on the spread of the \(x\) values in the particular sample. A regressor that varies little in the sample will appear unimportant even if its effect per unit is large. Use them with care for judging “importance”.
Scaling does not change \(t\) statistics, \(F\), \(R^2\) or residual patterns; it changes only the units of the coefficients.
Working with the correlation matrix \(\mathbf W'\mathbf W\) improves the numerical accuracy of computations and is the starting point for studying multicollinearity (Chapter 11) and for path analysis in plant breeding, where standardized coefficients are called path coefficients (direct effects).
In economics the elasticity at the means, \(\eta_j=b_j\,\bar x_j/\bar y\), is another unit-free measure: the percentage change in \(y\) for a 1% change in \(x_j\).
Example 6.1 For the data of Example 4.1, compute the standardized regression coefficients and recover the original coefficients.
Solution
The correlation matrix of the regressors and the vector of correlations with \(y\) are
and by Equation 6.9, \(b_0=7.500-(3.0118)(4.333)-(-1.2855)(8.500)=5.3754\), in agreement with Example 4.1.
In standardized units, \(x_1\) has an effect of 1.971 and \(x_2\) an effect of -1.171 standard deviations of \(y\) per standard deviation of the regressor. The large opposite-signed standardized coefficients, much larger in magnitude than the simple correlations, are a symptom of the high correlation \(r_{12}=0.955\) between the regressors.
6.5 R practical
d12 <-read.csv("csv/notes12.csv")# Unit normal scaling with scale(); no intercept neededzs <-as.data.frame(scale(d12))fz <-lm(y ~ x1 + x2 -1, data = zs)coef(fz) # gamma-hat
#> x1 x2
#> 1.971041 -1.171350
# Unit length scalingul <-function(v) (v -mean(v)) /sqrt(sum((v -mean(v))^2))wd <-as.data.frame(lapply(d12, ul))fw <-lm(y ~ x1 + x2 -1, data = wd)coef(fw) # delta-hat, identical
# From correlations directlysolve(cor(d12[, -1]), cor(d12[, -1], d12$y))
#> [,1]
#> x1 1.971041
#> x2 -1.171350
# Back to the original scalefit <-lm(y ~ x1 + x2, data = d12)coef(fw) *sd(d12$y) /sapply(d12[, -1], sd)
#> x1 x2
#> 3.011830 -1.285489
coef(fit)[-1]
#> x1 x2
#> 3.011830 -1.285489
Historical Insights
Path coefficients
Standardized regression coefficients were put to their most famous use by the geneticist Sewall Wright, who in 1921 introduced path analysis to separate the correlation between two variables into direct and indirect effects along a causal diagram. Wright’s path coefficients are exactly the standardized partial regression coefficients of this chapter. Dewey and Lu brought path analysis to plant breeding in 1959 with a study of yield components of crested wheatgrass, and it remains a standard tool for analysing yield components in crop improvement.
Quotes to Inspire
“Not everything that can be counted counts, and not everything that counts can be counted.” - William Bruce Cameron
6.6 Practical exercises
6.6.1 Practical 6.1: Which input matters more?
For the milk yield data of Practical 4.1, compute the standardized regression coefficients of concentrate (\(x_1\)) and green fodder (\(x_2\)) by unit length scaling, interpret them, and recover the original coefficients.
A one standard deviation increase in concentrate raises milk yield by 0.912 standard deviations, and one in green fodder by 0.094 standard deviations, each with the other held fixed: concentrate has the larger standardized effect. Back-transforming by Equation 6.8 with \(SS_T=151.333\), \(S_{11}=17.5\), \(S_{22}=10.833\) gives \(b_1=2.6831\) and \(b_2=0.3517\), and by Equation 6.9\(b_0=6.2791\), the same as Practical 4.1.
\(\mathbf R_{xx}=\mathbf I\), so \(\hat\delta_j=r_{jy}\).
\(\mathbf Z'\mathbf Z=14\,\mathbf W'\mathbf W\).
Montgomery, Douglas C., Elizabeth A. Peck, and G. Geoffrey Vining. 2021. Introduction to Linear Regression Analysis. 6th ed. Hoboken, NJ: John Wiley & Sons.