重学 Statistics, Cha16 General Linear Model

Curvilnear Relationship

当我们用 scatter diagram 来看的时候,发现 x y 的关系不完全是一条直线
这里写图片描述

另外把 residual 和 y 做一个 plot,也看到,是一个弧形的:
这里写图片描述

所以,我们用二次模型, second order model. 结果就比较好,r square 也高。

Interaction

怎么发现 x1 和 x2 之间有 interaction?
我们发现:广告花费 50000和100000所产生的平均销售区别,依赖于产品的价格。
在更高的价格,增加广告花费所带来的销售变化更小。

这里写图片描述

Transformation involving dependent variable

当我们用正常的 regression 得到的式子,发现:standardized residuals 和 y 画出来的图是一个三角形:
这里写图片描述
The variability in the residuals appears to increase as the value of y increase.

Problem : Nonconstant variance
If we work with the logarithm of the dependent variable instead of the original dependent variable, the effect will be to compress the values of the dependent variable and thus diminish the effects of nonconstant variance.
用因变量的对数代替原来的因变量,这样做的效果是压缩了因变量的数量,从而达到减少非常数方差的影响。

Nonlinear Model 用 linear 来做

这里写图片描述

16.2 Determining when to add or delete variables

问题: Does adding the variable x2 lead to a significant reduction in SSE?
这里写图片描述

Variable Selection Procedures

  1. Stepwise Regression
    1. 看现在 model 里面,delete 哪一个。 If the p-value for any inependent variable is greater than Alpha to remove, the independent variable with the largest p-value is removed from the model and the stepwise regression procedure begins a new step.
    2. 从未在 model 中,候选的变量选一个 p-value 最低的,但是要小区 Alpha to enter. It does so by first computing an F statistic and corresponding p-value for each independent variable that is not in the model.

问题:怎么一个个添加 Variable,用 f test 来做?

  1. Forward Regression
    1. Variables 一个个进入,进入的条件和 stepwise 一样
    2. 但是进去了之后就不会再考察了,进去之后不会再出来
  2. Backward Regression
    1. Variables 先全部进去,一个个剔除,剔除的条件和 stepwise 一样
    2. 剔除了之后,就不会再出来了
  3. Best-subsets Regression
    1. 把所有 model 都列出来
      这里写图片描述

虽然6个的有最高的 r square, 但是 a simpler model with fewer variables is usually preferred. 所以选4个 Variables, r-sq 是88.1%的那个。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值