ST758 -- Fall 2011 Homework #2 -- due Thursday, 15 September 2011 Exercises in Textbook: (*just turn in these) 2.14, 2.15 (on the computer you are using...), *2.26 *3.14 but use p'=(.7,.1,.1.,1) (find (4x3) L numerically only), 3.20, 3.21, *3.23 R Exercises:(just turn in 2), 3), 4) ) 1) Let y = (225, 215, 209, 175, 163, 135, 153, 125)' and let x = (37, 41, 41, 45, 45, 49, 49, 53)' 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 Cork Data from the file 'cork.dat' in the course 'rfiles' directory. Use 'readtable' or my old-fashioned code Cork <- t( matrix( scan("cork.dat"), 4, 28) ) which will make a 28x4 matrix. 3) Compute the sample covariance matrix using var(Cork) 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'