Question: I need the code to create the correct output Scenario You are a data analyst working for a real estate company. You have access to
I need the code to create the correct output
Scenario
You are a data analyst working for a real estate company. You have access to a large set of historical data that you can use to analyze relationships between different attributes of a house such as square footage or the number of bathroomsand the houses selling price. You have been asked to create different regression models to predict sale prices for houses based on critical variable factors. These regression models will help your company set better prices when listing a home for a client. Setting better prices will ensure that listings can be sold within a reasonable amount of time.
There are several variables in this data set, but you will be working with the following important variables:
Price Sale price of the home
bedrooms Number of bedrooms
bathrooms Number of bathrooms
sqftliving Size of the living area in sqft
sqftabove Sise of upper level in sqft
age Age of the home
appliancegrade Measure of craftsmanship and the quality of materials used to build the home
crime Crime rate per people
backyard Home has a backyard backyardor not backyard
schoolrating Average rating of schools in the area
view Home backs out to a lake viewbacks out to trees viewor backs out to a road view
housing readcsvfile"housingvcsvheaderTRUE, sep
# converting appropriate variables to factors
housing withinhousing
view factorview
backyard factorbackyard
# number of columns
ncolhousing
# number of rows
nrowhousing
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
