Fill This Form To Receive Instant Help
Homework answers / question archive / Optional R assignment For this optional assignment you will use a data set related to the Boston Housing market
Optional R assignment For this optional assignment you will use a data set related to the Boston Housing market. Download the dataset "BostonHousingSimple.csV' On Page Data for Assignments 3 under Introduction to R and put it under your R directory Prob_R. After importing the Boston Housing dataset in R, define a new data frame called BostonHousing to store the dataset. The data are based on the census tracts in the Boston Standard Metropolitan Statistical Area (SMSA). Each record corresponds to a census tract and has information regarding crime rates, median housing value in $1,000, average number of rooms per dwelling, etc. The detailed description of the dataset can be found at the end of the problem set.
(For full credits, show your codes, plots, screenshots of console and variables, etc. wherever necessary) a. For the variable 'ROOM' plot its histogram. Examine if any distribution you learned fits the data (you could use the package 'fitdistrplus' as discussed in the tutorial). Show the pdf and cdf of the proposed distribution. b. Split the Boston housing data into a test set and training set. Use 80% of the data for the training set, 20% as the test set. Use the code shown in the tutorial to randomly select 80% out of the 506 observations we have available in the entire dataset. Use the names 'Boston_training' and "Boston_test' for the selected data representing the training and test sets respectively. c. Build a linear regression model to predict the price of housing using any of the available variables as explanatory variables. y is MEDIANHOUSINGVALUE, and x could be TAX, ROOM or CRIME, etc., or a combination, e.g.: y = b0 + brROOM + b2*PTRATIO + b3.TAX Test different models and present the one you like the most. For the model you select, apply the model to predict the housing price in each census using the training set and test set. Plot the predicted vs. actual values for the training set and test set.
Description of Boston Housing Data The data is Housing data for 506 census tracts of Boston from the 1970 census. 1. Title: Boston Housing Data 2. Sources: (a) Origin: This dataset was taken from the StatLib library which is maintained at Carnegie Mellon University. (b) Creator: Harrison, D. and Rubinfeld, D.L. 'Hedonic prices and the demand for clean air', J. Environ. Economics & Management, vol.5, 81-102, 1978. (c) Date: July 7, 1993 3. Relevant Information: Concerns housing values in suburbs of Boston. 4. Number of observations: 506 Attribute Information: Census: Census ID CRIME: per capita crime rate INDUS: proportion of non-retail business acres
NOX: nitric oxides concentration (parts per 10 million) ROOM: average number of rooms per dwelling AGE: proportion of owner-occupied units built prior to 1940 DIS: weighted distances to five Boston employment centers TAX: full-value property-tax rate per $10,000 PTRATIO: pupil-teacher ratio by town MEDIANHOUSINGVALUE: Median value of owner-occupied homes in $1000's
Please download the answer file using this link
https://drive.google.com/file/d/1K4aFnKK8zqev7g42-9WqHVTJV-9_yWkN/view?usp=sharing