ST790R -- Fall 2010 Homework #2 -- due Thursday, 16 September 2010 Exercises in Textbook: (*just turn in these) *2.14, 2.15 (on the computer you are using...) 3.14 (find (4x3) L numerically only), 3.20, 3.21, 3.23(note error, see (5.9.4)) *0) (similar to 3.23) Find the derivative of the determinant of a matrix with respect to one of its elements. (Hint: use the result |I + ab'| = (1+b'a) ) R Exercises:(just turn in 2), 3), 4) ) 1) Let y = (4.82, 4.88, 4.70, 4.72, 4.88, 4.66, 4.94, 4.80)' and let x = (38, 40, 42, 44, 36, 42, 38, 40)' be the covariate of a simple linear regression model, where the first column of the design matrix X is one, and the second column is x. Compute y'Pone y, y'(Px-Pone)y, and y'(I-Px)y, where Pone is a matrix with each element equal to 1/n (here n=8), and Px is X*inv(X'X)X' the usual symmetric projection matrix. *2) Read in the Ramus Data from the file 'ramus.dat' in the course 'rfiles' directory. My old-fashioned code is Ramus <- t( matrix( scan("ramus.dat"), 4, 20) ) which will make a 20x4 matrix. *3) Compute the sample covariance matrix using var(Ramus) and call this matrix V *4) Partition the matrix V into the first two and last two rows/ columns and compute V11 - V12*inv(V22)*V21 *** use only 'chol' and 'forwardsolve' ***