Question
Run the R packages mentioned below to generate the results: library(MASS) 1.Use the Boston data set from the MASS package, where the response variable is
Run the R packages mentioned below to generate the results:
library(MASS)
1.Use the Boston data set from the MASS package, where the response variable is the median value of owner (medv) and the rest of the variables are predictors.
a). Obtain the dispersion matrix and comment on the results of the marginal relations. Also obtain the matrix of sample correlations between the and compare them with the dispersion matrix. Are the correlations obtained as expected? Describe and interpret the five most salient correlations.
b). Propose a regression model to explain the answer. Show all the steps you use to develop your proposal, including intermediate models. Justify the choice of your predictors or regressors, do you consider some interactions plausible? Interpret the estimated coefficients and carry out the corresponding hypothesis tests. Examine the residual plots and the effect plots. Justify why your proposed model is the best alternative and comment on whether you consider it appropriate to explain the phenomenon. Discuss whether the use of R^2 to evaluate the model is relevant and why. Do you think there could be lurking variables that should be considered?
> library(MASS) > head(Boston) crim zn indus chas nox rm age dis rad tax ptratio black lstat medv 1 0.00632 18 2.31 0 0.538 6.575 65.2 4.0900 1 296 15.3 396.90 4.98 24.0 2 0.02731 0 7.07 0 0.469 6.421 78.9 4.9671 2 242 17.8 396.90 9.14 21.6 3 0.02729 0 7.07 0 0.469 7.185 61.1 4.9671 2 242 17.8 392.83 4.03 34.7 4 0.03237 0 2.18 0 0.458 6.998 45.8 6.0622 3 222 18.7 394.63 2.94 33.4 5 0.06905 0 2.18 0 0.458 7.147 54.2 6.0622 3 222 18.7 396.90 5.33 36.2 6 0.02985 0 2.18 0 0.458 6.430 58.7 6.0622 3 222 18.7 394.12 5.21 28.7 > dim(Boston) [1] 506 14
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started