Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Multiple Linear Regression - California housing dataset Download the dataset from StatlibLinks to an external site.. It's a ZIP file, so unzip the file. Open

Multiple Linear Regression -

California housing dataset

Download the dataset from StatlibLinks to an external site.. It's a ZIP file, so unzip the file. Open it in your favorite text editor (Notepad++, Sublime Text, VS Code, are three good ones. If one of those is not your favorite, let me know which one is. If it's notepad or wordpad on Windows, you should reconsider your favorite!) and remove all the descriptive information so that the first line of the file will be the first line of data. Save this edited file as houses.dat and make sure it's in the same folder as your R code in R Studio

For this dataset, use multiple linear regression to answer the following questions or create the requested graphics. Include all your responses to any questions asked below as comments in your R script.

Use read.table() to read in the dataset. It's just one instance per row separated only by spaces. The easiest way to read it in is to set the option to strip whitespace to TRUE. If you don't, R will likely treat some of the spaces as missing data. The descriptive text you edited out above contains information about which feature is which, so assign descriptive names to the columns using that information after reading it into R.

Create the scatterplot matrix for the dataset. Which predictors appear to be most highly correlated with the response? Which predictors appear to be most highly correlated with each other? Is there any visual evidence of outliers?

Show the correlation matrix. Do its entries confirm your assumptions from the scatterplot matrix? Are there any other pairs of features with significant correlations?

use lm() to create a linear fit of median house price against all the other features. .

Is there a relationship between at least one predictor and the response? Be sure to explain your reasoning.

Which predictors appear to have a statistically significant relationship to the response? Be sure to explain your reasoning and quantify the relationship(s).

What median housing price is predicted for the instance below? Incidentally, the actual median house price for this instance is $89,400.

2.3885999999999998e+000 1.6000000000000000e+001 2.7850000000000000e+003 6.1600000000000000e+002 1.3870000000000000e+003 5.3000000000000000e+002 3.9369999999999997e+001 -1.2123999999999999e+002

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago