Question: Create a function in R that generates a random response vector, Y, with n observations and 4 covariate vectors with n observations each. They should
Create a function in R that generates a random response vector, Y, with n observations and 4 covariate vectors with n observations each. They should be generated from a normal distribution and you may choose a mean and standarddeviation that makes sense to you. The function should fit a multiple linear regression model and return the model summary, the Residual vs. Fitted Values plot, and the QQ plot for residuals.The only argument in this function is n.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
