STAT331: Assignment 3 Due: Friday, July 23, 2021 at 5pmET on Crowdmark General instructions: • Your work may be written up using R Markdown, LaTeX, or Word. If you hand-write your solutions, make sure they are legible. No points will be given if the grader cannot read your handwriting. • You may discuss problems with your peers, but you must write up your own answers, and include names of anyone you worked with on your assignment. • For data analysis problems: You must clearly present your final answers in addition to the steps or commands for obtaining your answers. You must include well-commented R code (and only necessary code) to reproduce your work. 1. [Coding: 10 points] Write an R function from scratch to conduct forward selection as described in class. Your function should allow the following user-specified options: selection based on adjusted R2, AIC, as well as BIC. You can use built in functions in R like lm() or summary() but you cannot use any functions dedicated to model selection like step, etc. You only need to accommodate continuous covariates, but you can get bonus points for handling categorical covariates and hierarchically well-formulated interactions. Make sure to thoroughly comment your code. 1 2. [Theory: 5 points] Consider the Jackknife studentized residuals from class (Lecture 19) ri( i) = eiq