R语言 | STAT5002 Introduction to Statistics

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
这是一篇是用R语言选择一个随机家庭建立线性回归模型判断家庭情况的作业
STAT5002 Introduction to Statistics – Semester 1, 2020
1. If I select a random household from Ames, estimate the probability that
(a) the selected household has a basement
(b) the selected household has a pool
(c) the selected household has a pool and a basement
2. In this question consider the four variables SalePrice (Y ), Lot.Area (x1), Overall.Qual (x2) and
MS.SubClass (x3).
1
(a) Consider the four simple linear regression model:
Yij = 0 + 1x1i + ij (1)
log(Yij ) = 0 + 1x1i + ij (2)
Yij = 0 + 1 log(x1i) + ij (3)
log(Yij ) = 0 + 1 log(x1i) + ij (4)
where ij N(0, 2).
By considering some diagnostic plots and the coecient of determination, r2, explain which of
the four model is the best.
(b) Using only Y , x1, x2 and x3, what is the best (parsimonious) regression model that fits the data
Explain your conclusion.
(c) Regardless of your answer in (b), consider the following model
log(Yij ) = 0 + 1x1i + 2x2i + ij (5)
assuming ij N(0, 2).
i. Write the fitted model for (5).
ii. Are there any outliers under model (5)
iii. You inspect a property with a lot area of 10000 feet2 with and an overall quality rated as
“Excellent” using the same standard of rating in the Ames Housing data. What is your
expected sales price under model (5)
2

发表评论

了解 KJESSAY历史案例 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读