Solved – Enforcing orthogonality of inputs for multiple linear regression

linear modelmultiple regressionregressionself-study

I am studying the well-known book Elements of Statistical Learning. When the multiple linear regression is described it uses the simple univariate regression as a building block, which makes sense to me. As far as I understand it uses orthogonality property of input vectors in order to split multivariate regression in simple independent regressions, and when inputs are not orthogonal, then those inputs are transformed in such a way that what remains is orthogonal. By orthogonal vectors I understand 2 vectors which have dot product equals with zero.

Now in the book is noted that

Orthogonal inputs occurs most often with balanced, designed experiments (where orthogonality is enforced), but almost never with observational data.

How can one enforce that? The only situation that I can imagine is when one would use binary 0/1 values for each possible nominal value. To be more clear: one could have a nominal column sex with labels: male and female. He can create two input columns, one called sex.male with value 1 when sex is male and 0 otherwise. The corresponding column sex.female would then have 1 if sex is female and 0 otherwise. These 2 numerical columns would be orthogonal. Is possible to do enforcing for continuous variables?

Best Answer

There are plenty of examples of orthogonal designs for continuous predictors in the experimental design literature. A simple one is the design matrix (using centred predictors)

$$\boldsymbol{X}=(\boldsymbol{I},\boldsymbol{x}_1,\boldsymbol{x}_2)=\left(\begin{matrix} 1 & -1 & -1\\ 1 & -1 & 0\\ 1 & -1 & 1\\ 1 & 0 & -1\\ 1 & 0 & 0\\ 1 & 0 & 1\\ 1 & 1 & -1\\ 1 & 1 & 0\\ 1 & 1 & 1\\ \end{matrix}\right)$$

for the linear regression $$y_i=\beta_0 + \beta_1 x_{i1} + \beta_2 x_{i2} +\varepsilon_i$$

The diagonal variance–covariance matrix for the parameter estimates

$$\operatorname{Var} \boldsymbol{\hat\beta}= (\boldsymbol{X}^\mathrm{T}\boldsymbol{X})^{-1}\sigma^2=\left(\begin{matrix} \tfrac{1}{9} & 0 & 0\\ 0 & \tfrac{1}{6} & 0\\ 0 & 0 & \tfrac{1}{6}\\ \end{matrix}\right)\sigma^2$$

where $\sigma^2$ is the error variance, shows that you have uncorrelated estimators for $\beta_1$ & $\beta_2$