a) Write an R (or Splus) program that performs the Householder transformation. b) Apply the program written
Question 1: a) Write an R (or Splus) program that performs the Householder transformation.
b) Apply the program written at a) to the matrix A constructed in \(R\) using the following commands:
Question 2:
- Prove that the triangulation of the matrix above can be performed using Givens rotations.
- Perform the same task as the one performed by the Househoslder transformation using a series of Givens rotations. Attach the written code of your procedure.
- Modify the code so that it can be used for any matrix \(A \in R^{n \times p}\) with \(n>p\) and not only the one defined in b).
Question 3:
If \(Q \in R^{n \times n}\) and \(x \in R^{n}\) show the equivalence of the two conditions:
- \(\|Q x\|=\|x\|\), where \(\|x\|^{2}=\sum_{i=1}^{n} x_{i}^{2}\)
- \(Q^{T} Q=I\), where I is the identity matrix of dimension \(\mathrm{n}\).
Question 4:
Consider the linear regression model $Y=A \times \beta+\epsilon$ where
\(Y=(5.28,19.93,22.62,8.3,22.44,14.04,14.13,23.03,37.56,44.52)^{T}\)
and \(\mathrm{A}\) is the matrix defined in Problem 1
- Find the matrix \(\mathrm{Q}\) such that \(A=Q A^{*}\), where \(A^{*}\) represents the upper triangular matrix obtained after applying the Householder (or Givens) transformations.
- Show that \(\left(A^{*}\right)^{T} \times A^{*}=A^{T} \times A\).
- Find the parameter estimates for $\beta$ using back substitution. (attach code)
Question 5:
Consider the linear regression problem \(Y=A \beta+\epsilon\) with \(\epsilon \sim N\left(0 ; \sigma^{2} I_{n}\right)\), matrix A as given in Problem 1 and \(\mathrm{Y}\) as given in Problem 4.
- Find a matrix \(U \in R^{4 \times 4}\) such that \(U^{T}\left(A^{T} A\right) U=D\) with \(D\) a diagonal matrix with diagonal elements \(\lambda_{1} \geq \lambda_{2} \geq \lambda_{3} \geq \lambda_{4}\).
-
Define \(Z=A U\). If \(\mathrm{U}\) has an inverse, define \(\alpha=U^{-1} \beta\). Show that if we fit the model \(Y=Z \alpha+\epsilon\) then
\(\operatorname{Var}\left(\hat{\alpha}_{1}\right) \leq \operatorname{Var}\left(\hat{\alpha}_{2}\right) \leq \operatorname{Var}\left(\hat{\alpha}_{3}\right) \leq \operatorname{Var}\left(\hat{\alpha}_{4}\right)\) - Find an estimate of \(\beta\) from an estimate of \(\alpha\).
- Repeat the procedure described at a) after "centering" the vector \(y\) and the columns of A. (a vector is centered when its mean is zero). What is the statistical interpretation of the matrix \(A^{T} A\) after centering?
Bonus 1: Show that if the matrix \(A\in {{\mathbb{R}}^{n\times n}}\) is real and \({{A}^{T}}=-A\), then \(I-A\) is nonsingular, and the matrix \({{(I-A)}^{-1}}(I+A)\) is orthogonal.
Bonus 2: A matrix is triangular if is upper triangular or lower triangular. Show that a square triangular matrix that is orthogonal is diagonal.
Deliverable: Word Document
