logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Basudev RoyMathematics
(/5)

543 Answers

Hire Me
expert
Thomas BornholdttEnglish
(5/5)

617 Answers

Hire Me
expert
Francis OrtizPsychology
(5/5)

809 Answers

Hire Me
expert
Mason RamirezzTechnical writing
(4/5)

844 Answers

Hire Me
Mathematics
(5/5)

make predictions using the predict function passing in the model2 and the predictors dataframe you just made

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Here is some data for Diamonds

Run this first to set nice print outsoptions("scipen"=100, "digits"=4)

carat<-c(0.71,0.72,0.33,1.52,1.23,0.54,0.32,1.31,1.11,1.03,0.56,1.29,0.53,1.7, 0.3) clarity<-c(3,5,4,4,4,6,5,3,2,2,5,2,5,5,4)

price<-c(2554,2691,854,9576,9116,1829,828,8767,5648,4283,1131,5601,1577,11257,615)

df<-data.frame(CODE)

print out info for the dataframe using str

CODE

print out the first few rows in the dataframe use head

CODE

create scatterplots of the columns plot(df, upper.panel=NULL, pch=19)

CODE

create correlation matrix for df using the code cor(df)

CODE

run a linear regression model using carat and clarity to predict price

model1<-lm(CODE,data=df) summary(model1)

Test for overall significant of linear relationship:

overall p-value = ????

Clarity:

p-value for clarity = ???

Carat:

p-value for carat = ???

Eliminate Clarity from the model:

run a new linear regression model using carat to predict price model2<-lm(CODE,data=df) summary(model2)

Fill in the ??? below with the right value:

Test for overall significant:

overall p = ???

The regression equation is this:

price =???(carat) + ??? The standard error is: std error = ???

Make predictions when:

carat is 1.3

carat is 0.6

carat is 1.8

 

To do this:

assign a vector carat to hold the predictors above (replace CODE below) create a dataframe called predictors using the carat vector

print out the predictors dataframe

 

carat<-CODE

predictors <- data.frame(carat) predictors

 

Now lets do the predictions:

make predictions using the predict function passing in the model2 and the predictors data frame you just made (pass 2 arguments where you see CODE) print out the predictions

predictions<-predict(CODE) predictions

Fill in the correct answers below:

Prediction when carat is 1.3: ??? Prediction when carat is 0.6: ??? Prediction when carat is 1.8: ???

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme