Question: Using R code please answer the following question. Thank you Linear regression in R: (print out your R code and results) The data set whiteside
Using R code please answer the following question. Thank you

Linear regression in R: (print out your R code and results) The data set whiteside is available after loading the MASS package by calling li- brary (MASS). For detailed description of this data set, run ?whitwside. Complete the following questions: (a) From whiteside, select a subset called whitesideBefore which only contains obser vations whose Insul = Before and has two columns Temp and Gas. (b) Use the plot function to produce a scatterplot of whitesideBefore. Put Temp on x-axis and Gas on y-axis. From the plot, which correlation type is between Temp and Gas? Does the linear model looks suitable for this data set? (c) Call function Im to fit a simple linear model for whitesideBefore. Set Gas as response variable and Temp as predictor. Assign the fitting result to some name, say whiteside.Im, for later usage. (d) Report LSE of the intercept and slope coefficients. Also report all the fitted values and residulas
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
