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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started