Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Goal is to build a Multiple Linear Regression Model in R. Please take the screenshots of the outputs from each step and include in the

Goal is to build a Multiple Linear Regression Model in R.

Please take the screenshots of the outputs from each step and include in the word document. Explain the Outputs in each step as per your understanding.

  1. data(iris) # load iris data
  2. head(iris) # peek at the data
  3. unique(iris$Species) # look at unique species
  4. plot(iris[1:4]) # Scatterplot matrix
  5. x <- iris$Petal.Length
  6. y <- iris$Petal.width
  7. model <- lm(y ~ x) # simple linear regression model
  8. lines (

x = iris$Petal.Length,

y = model$fitted,

col = red

lwd = 3)

  1. cor (

x = iris$Petal.Length,

y = iris$Petal.Width) # Get Correlation Coefficient

  1. summary (model) # Summarize the Model
  2. predict (

object = model,

newdata = data.frame(x = c(2,5,7)))

  1. Now add one more variable to your Model and repeat the steps from 5 to 11. (Multiple Linear Regression Model).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

=+making elaborative inferences and developing situation models?

Answered: 1 week ago

Question

Identify and control your anxieties

Answered: 1 week ago

Question

Understanding and Addressing Anxiety

Answered: 1 week ago