I'm a bit rusty on my linear algebra and was given this problem in my advanced linear models class.

Consider the use of two design matricesXandZfor estimating a curve based on the two modelsy = Xb+e1andy = Za+e2. LetH=X(X'X)^-1*X'denote the hat matrix for the first model. Recall that hat matrices are projection matrices. Consider the case of projecting the design matrixZonto the column space ofXusing the transformationZhat=HZ.

Letbhat= (X'X)^-1*X'ydenote the least squares estimator ofbin the first model. Leta2denote the least squares estimator ofausing the design matrixZhat.Find an expression fora2in terms ofbhat.

Any help would be greatly appreciated!!