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 (30 pts) Fill in the blank: Say we are fitting a linear regression model for g(r,s) = E(W | U = r, V = s), and we suspect g(r,s1) - g(r,s2) depends on r. This suggests including a(n) _____________________. QUESTION -ext .R -run 'Rscript omsi_answer2.R' (35 pts) Here you will generate a small data set with rbind(). Interpret the first two columns as factors user and item ID, respectively, and the third column as numerical rating. The code then will fit a linear model of rating against user and item, and return the predicted rating that user 2 would give item 2. Warning: This is just small, toy dataset; the prediction may come out very large, negative etc. pred22 <- function() { m <- rbind(c(1,4,5),c(1,2,1),c(2,3,4),c(2,1,1),c(3,4,2),c(3,1,5),c(4,4,1)) } print(pred22()) QUESTION -ext .R -run 'Rscript omsi_answer3.R' (35 pts) This question involves the InstEval data. Our interest is in whether some departments tend to get higher evaluation scores than others. Write code that returns an R vector, with element i consisting of the mean rating for department i. For full credit, you must use R's table() function. cmpdepts <- function() { library(lme4) data(InstEval) ie <- InstEval } print(cmpdepts()[['8']])