Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the train.csv file to complete this case study which contains home sales data for Ames, Iowa in 2009. You will be using this dataset

Use the train.csv file to complete this case study which contains home sales data for Ames, Iowa in 2009. You will be using this dataset as you learn multiple regression (and later, regularization) to predict home sales prices from home features (predictors) in a competition against other MGSC 291 students. To find the best model for prediction, you need to explore and understand the data available to you. This purpose of this case is to begin this exploration in preparation for using the data later for predictions.

data set file https://drive.google.com/file/d/1NjWzEM-vURReFKqQ22cS5SSYailgaR00/view?usp=sharing

THIS CODE IS WRONG

DONT SNED ME THE SAME CODE PLEASE

Q6 # There are 4 rating categories for kitchen quality:

fair, average, good, and excellent.

Use the sum() function on a logical vector to count

how many homes have kitchen quality rated as "Excellent"?

Hint: use the summary() function on the kitchen quality column

to see how this quality category is spelled.

sum(train$KitchenQual == "Excellent")

Q7 # Use the sum() function on a logical vector to count

how many homes sold for more than $350,000

and have "Excellent" as their kitchen quality.

sum((train$KitchenQual == "Excellent") & (train$SalePrice > 350000))

Q8 # Use the mean() function to find the average sales price

for a home with kitchen quality rating of "Excellent".

mean(train$SalePrice[train$KitchenQual == "Excellent"], na.rm = TRUE)

Q9 # Use the mean() function to find the average sales price

for a home with kitchen quality rating of "Excellent"

or has a garage for more than 2 cars.

mean(train$SalePrice[(train$KitchenQual == "Excellent") | (train$GarageCars > 2)], na.rm = TRUE)

Q10 # Use the which() function on a logical vector to find

the observations number(s) for a home with a

kitchen quality rating of "Excellent"

and sales price of at most $195,000.

which((train$KitchenQual == "Excellent") & (train$SalePrice <= 195000))

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

More Books

Students also viewed these Databases questions

Question

What is the orientation toward time?

Answered: 1 week ago

Question

4. How is culture a contested site?

Answered: 1 week ago