Problem A
Consider the modelling of house selling price. The data can be downloaded into R using:
read.table(url(“http://pages.uwf.edu/acohen/teaching/glm/house.txt”))
The data contains the following variables: price (in $1000), new (0=old, 1=new), size (sq ft),
beds (number of bedrooms), baths (number of bathrooms), and taxes (annual tax bill in $). We consider price as the response variable. The goal is to fit a linear model to explore the house selling
price variability.
Consider this model with interaction price~new+size+new:size, and the following steps in your modeling process:
Plot data: price vs. size while marking observations where new=1 and new=0.
Discuss linearity, normality and constant-variance.
Consider a transformation, if needed.
Compare the model with and without interactions.
Identify if any influential observations exist. If yes, remove at most 2 observations and redo
the modeling. Comment on the results.
Plot the regression lines and interpret the final model.
Now consider adding the number of beds to the model:
price~new+size+new:size+beds.
1. Before you fit this model, find the correlation (function corin R) between the price and beds.
Comment.
2. Fit the model and interpret the coefficient of beds.
3. Comment on the contradiction you observed.
版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。