Question: please write in R This problem uses the data set water from the alr4 package. Fit a model with BSAAM as the response and OPBPC,

please write in R

This problem uses the data set water from the alr4 package. Fit a model with BSAAM as the response and OPBPC, OPRC, and OPSLAKE as predictor.

please write in RThis problem uses the data set water from the

4. This problem uses the data set UBSprices from the alr4 package. Fit a model with big- mac2009 as the response and bread2009, rice2009 as predictors. Perform residual diagnos- tics on this model to answer the following questions. (a) Which plot do you want to draw to check the Linearity assumption? And report your finding(s). (b) Which plot do you want to draw to check the Equal Variances (or Constant Variances) assumption? And report your nding(s). (0) Which plot do you want to draw to check the Normality assumption? And report your nding(s). (d) Shapiro-Wilk test is a test of normality of a numeric variable. The null hypothesis for this test is that the variable is normally distributed. Use the R function shapiro.test() to test if the residuals of the linear t is normally distributed. State the pvalue of this test and your conclusion given cu = 0.05. Does the result support your conclusion in part (c)? (Use the code ?shapir0.test or help(shapiro.test) to understand how to use this function.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!