DESCRIPTION Students: Please note instructions in paper copy of quiz. Save your files often, make sure OMSI fills your entire screen at all times, etc. A question may not fully fit into your OMSI question box, which is not scrollable. You can try adjusting the relative size of the question and answer boxes, but remember that clicking CopyQtoA will copy the entire question box to the answer box. QUESTION (25 pts, text) In the InstEval data, there is a 'service' dummy variable. There is no 'nonservice' dummy variable, which of course would be redundant information. Apart from wanting to avoid redundancy, why is there no 'nonservice'? QUESTION -ext .R -run 'Rscript omsi_answer2.R' (25 pts, code) Write code below to regress y against all the other variables except s and d. Briefly discuss the practical implications of the estimated coefficients for departments, placing your remarks in the comment "place discussion here" (more than one comment line is fine if you wish). library(rectools) getInstEval() print(lm(y ~ )) # place discussion here QUESTION -ext .R -run 'Rscript omsi_answer3.R' (25 pts, code) Fill in the blanks below. The function will return the predicted rating for item itm, based on ud, the output from formUserData(). Here the user has rated the items in usrItms, with ratings usrRatings. We use k nearest neighbors. This user is presumed NOT in ud. f <- function(ud,itm,usrItms,usrRatings,k) { datum <- predict( ) } library(rectools) getInstEval() ud <- formUserData(ivl[,1:3]) print(f(ud,468,c(1,12),c(5,3),6)) # about 3.17 QUESTION (25 pts, text) Let the matrix A and vector D be as on p.29 of our text (in general, not just for weight, height and age.) Let the matrix B denote new cases to predict, with the same structure as in A (including the 1s column). Let G be the vector of predicted values for the new data B, using the linear model fitted to A and D. Give a matrix equation for G. (If you need to indicate a matrix inverse, say for a matrix M, write it as inv(M).)