Question: Find the following for multiple linear regression (a) Set three random vectors of 1000 random numbers as follows: x1: from Unif(0,5), x2: from Binom(70,0.2), and

Find the following for multiple linear regression

(a) Set three random vectors of 1000 random numbers as follows: x1: from Unif(0,5), x2: from Binom(70,0.2), and x3: from Exp(1). Define y = x1 + 4*x2 + 8*x3 + 10 + Err, where Err ~ N(0,sd=10).

(b) Generate a dataframe df containing these four variables and create scatterplots of all pairs of these four variables.

(c) Generate a multiple regression model for y as a linear function of x1, x2, and x3 and print its summary.

(d) Run your entire code for parts (a)-(c) several times and keep an eye at summary() outputs. Which of the variables has the 'slope' that has the largest variance? Explain which of the summary() parameters describes this?

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!