Question
set.seed(ENTER_YOUR_ID) y
set.seed(ENTER_YOUR_ID)
y<- round(runif(20, 2, 9), 3)
x1<- round(y*25*(1-runif(20, -0.7, 0.7)), 3)
x2<- c(rep("East", 5), rep("West", 5), rep("North", 5), rep("South", 5))
x3<- round(y*(1-runif(20, -0.5, 0.5)), 3)
For the purpose of the exam, the generated variables represent the following:
y - "selling price of a house in 2021" in 100,000 USD
x1 - "square footage" in sq. m.
x2 - "location within the city - East/West/North/South"
x3 - "selling price of a house in 2020" in 100,000 USD
Note: ID number that needs to be entered- 02514
1. SLR/MLR
a) Display the generated values (they should be copied from R/RStudio). You could run the following code to do that
print(y)
print(x1)
print(x2)
print(x3)
b) First, briefly discuss what the main difference between simple and multiple linear regressions is and comment on what the type variables y, x1, x2, x3 are
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