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

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!