Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. A multiple regression analysis is to be carried out for the model y = AX1+AX2

ID: 3305933 • Letter: 1

Question

1. A multiple regression analysis is to be carried out for the model y = AX1+AX2+3Xs+E. The model does not include an intercept term, so np column of 1's in X. There are six observations, with YT (0,1,-1,0,2,0,1,2,5) and 10 0 1 0 0 1 0 0 0 1 0 x-1010 0 0 1 0 0 1 0 0 1 0 0 1 (Do this question by hand. Use R only to check your answers. Note that in this case there is no intercept in the model, so that X does NOT contain a leading column of 1's.) (a) calculate (X'X) (b) calculate (X'X)-1 (note that (X'X) is a diagonal matrix, so it's inverse is easily written down. (c) calculate the least squares estimates. (d) what is the predicted value of y for the first observation? (e) what is the residual corresponding to the first observation? (f) calculate the error sum of squares

Explanation / Answer

a)

X =

     1     0     0
     1     0     0
     1     0     0
     0     1     0
     0     1     0
     0     1     0
     0     0     1
     0     0     1
     0     0     1

X'

   1     1     1     0     0     0     0     0     0
     0     0     0     1     1     1     0     0     0
     0     0     0     0     0     0     1     1     1

(X'X)

   3     0     0
     0     3     0
     0     0     3

b)

inv(X'X)


    0.3333         0         0
         0    0.3333         0
         0         0    0.3333

c) least square estimates b^ = (inv(X'*X) * (X'*Y)

X'*Y

     0
     2
     8

(inv(X'*X) * (X'*Y)

0
    0.6667
    2.6667

d) y^ = 0 *x1 + 0.6667 *x2 +2.6666*x3

first observation (1,0,0)

y^ = 0

e) residual = yi - yi^ = 0 -0 = 0

Please rate