Skip to Content
面向数据科学家的实用统计学
book

面向数据科学家的实用统计学

by Peter Bruce, Andrew Bruce
October 2018
Beginner to intermediate
238 pages
6h 32m
Chinese
Posts & Telecom Press
Content preview from 面向数据科学家的实用统计学
116
4
主效应
预测变量和结果变量之间的关系,该关系独立于其他的变量。
交互作用
两个或两个以上预测变量和响应之间的相互依赖关系。
4.5.1
 相关的预测变量
在多元回归中,预测变量通常是相互关联的。例如,下面查看一下
4.2.4
节中拟合的
step_
lm
模型的回归系数。
step_lm$coefficients
(Intercept) SqFtTotLiving
6.227632e+06 1.865012e+02
Bathrooms Bedrooms
4.472172e+04 -4.980718e+04
BldgGrade PropertyTypeSingle Family
1.391792e+05 2.332869e+04
PropertyTypeTownhouse SqFtFinBasement
9.221625e+04 9.039911e+00
YrBuilt
-3.592468e+03
我们看到,
Bedrooms
的回归系数竟然是负值。这意味着在房子中增加一间卧室,反而会降
低房屋的价值。为什么会发生这种情况?这是因为预测变量是相互关联的。面积大的房子
一般有更多的卧室,而房屋的价值受面积大小的影响,而非卧室的数量。对于两个面积相
同的房子,我们更喜欢的通常不是卧室更多但面积更小的那个。
如果预测变量是相互关联的,那么回归系数的符号和值会难以解释(并且会提高估计量的
标准误差)。卧室、房屋面积和卫生间数量等变量就是相关的。下面的例子展示了这一关
联。我们在回归方程中移除了 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普
基于Python的智能文本分析

基于Python的智能文本分析

Benjamin Bengfort, Rebecca Bilbro, Tony Ojeda

Publisher Resources

ISBN: 9787115493668