Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

writing a script in R and submit both R codes and a Word document. Load the dataset in kc_house_data .csv into R. Call the loaded

writing a script in R and submit both R codes and a Word document.

    1. Load the dataset in kc_house_data.csv into R. Call the loaded data kc_house_data. Make sure that you have the directory set to the correct location for the data.

    2. Build a linear model to forecast the price using bedrooms, bathrooms and sqft_living.

a. Then write down the corresponding math formula.

b. Is it a good model based on R square or adjusted R square?

3. Build a linear model to forecast the price using bedrooms, bathrooms and sqft_living and all the cross effects between them.

a. Then write down the corresponding math formula.

b. Is it a better model than the model in Question 2 based on adjusted R square?

4. Build a linear model to forecast the price using bedrooms, bathrooms and sqft_living,waterfront and grade.

a. Then write down the corresponding math formula.

b. Is it a better model than the model in Question 3 based on adjusted R square?

5. Build a linear model to forecast the price using all other columns except id, date, zipcode, lat, and long without a y-intercept. If we only consider the models defined in Q2, Q3, Q4 and Q5, which model do you recommend based on the adjusted R squared value?

6. You are asked to build a linear model to forecast price using bedrooms, bathrooms, sqft_living, sqft_lot, floors, waterfront, view, condition, and grade. Then you are given the flowing new house info:

bedrooms

bathrooms

sqft_living

sqft_lot

floors

waterfront

view

condition

grade

4

2

2560

7650

1.5

1

3

5

10

a. Predict the average sales price for this house.

b. Predict the 95% predicted interval for this house.

the kc_house_data_cvs , could be pulled by searching on google "house sale in king county usa kaggle"

it should the second website by kaggle harlfoxem between may 2014 and may 2015

R script

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

Students also viewed these Databases questions