P133,这是第二次作业,考察多重线性回归。这个youtube频道真是精品,用R做统计。这里是R代码的总结。
连续变量和类别型变量总要分开讨论;
多重线性回归可以写成矩阵形式的一元一次回归;相当于把多变量当成列向量压缩一下;矩阵有着非常优美的简单的计算法则,大大简化了计算的复杂度;
在建多重线性回归模型时我们会遇到很多问题:
- 选哪些变量建模,一元的很简单,可以判断有无显著性,多元就复杂了,我们收集的很多变量可能和因变量之间没有关系,必须过滤;
- 哪些变量之间有相关性,必须把相关性考虑进模型;
- 如何检测是否存在多次的关系?
ANOVA;partition variability into different parts with different explanations that add up to a total that is related to overall variance.
If the null hypothesis is true, then the Model SS should be just random variation, so that both the Model MS and Residual MS become estimates of the same variance, so the ratio will be around 1. However, if the null is false, the ratio should be large.
So this explains why our test statistic i