1. (Project 8.38 in KNN) Return to the SENIC Project data from earlier assignments. Here we consider the regression rela
Posted: Mon Nov 15, 2021 11:05 am
question in R and show the detailed code 
1. (Project 8.38 in KNN) Return to the SENIC Project data from earlier assignments. Here we consider the regression relating number of nurses (Y) to available facilities and services (2). (a) Make a scatterplot of the data, and overlay a lowess smoother. Does a linear mean function seem plausible for these data? (b) Fit the second order mean function Y; = Bo + Bix? + B11x? + Ei, į = 1, 2,...,n, assuming a constant variance Var[ei] = 0?, i=1,2,...,n. Overlay the estimated mean function on your scatterplot from part (a). How closely does your fitted model agree with the lowess smoother? (c) Assume normality and test whether the quadratic term can be dropped from the model. Clearly state your null and alternative hypotheses, find and interpret the P-value, and clearly state your conclusion. (d) Obtain separate 95% prediction intervals for the number of nurses at two hospitals, one with an AFS percentage of 30 and one with an AFS percentage of 60. Interpret the resulting intervals. What is your simultaneous confidence level in the correctness of both intervals?
please do this 
1. (Project 8.38 in KNN) Return to the SENIC Project data from earlier assignments. Here we consider the regression relating number of nurses (Y) to available facilities and services (2). (a) Make a scatterplot of the data, and overlay a lowess smoother. Does a linear mean function seem plausible for these data? (b) Fit the second order mean function Y; = Bo + Bix? + B11x? + Ei, į = 1, 2,...,n, assuming a constant variance Var[ei] = 0?, i=1,2,...,n. Overlay the estimated mean function on your scatterplot from part (a). How closely does your fitted model agree with the lowess smoother? (c) Assume normality and test whether the quadratic term can be dropped from the model. Clearly state your null and alternative hypotheses, find and interpret the P-value, and clearly state your conclusion. (d) Obtain separate 95% prediction intervals for the number of nurses at two hospitals, one with an AFS percentage of 30 and one with an AFS percentage of 60. Interpret the resulting intervals. What is your simultaneous confidence level in the correctness of both intervals?