【回归分析】[5]--多元线性回归对参数的F检验
【回归分析】[5]--多元线性回归对参数的F检验
目标:为了检验
(a).多个系数同时为0
(b).系数相等
(c).系数存在线性关系
思想:
利用条件得到简化模型,用简化模型与原模型比较,若两者误差相差不大,则使用简化模型
看一下检验统计量的构造:
F就是构造的统计量,服从F分布
我们来看一个例子
(* 顺序为 1年龄 2HS 3收入 4 黑人比例 5 女人比例 6价格 7销量*) data = {{27.00, 41.30, 2948, 26.20, 51.70, 42.70, 89.80}, {22.90, 66.70, 4644, 3.00, 45.70, 41.80, 121.30}, {26.30, 58.10, 3665, 3.00, 50.80, 38.50, 115.20}, {29.10, 39.90, 2878, 18.30, 51.50, 38.80, 100.30}, {28.10, 62.60, 4493, 7.00, 50.80, 39.70, 123.00}, {26.20, 63.90, 3855, 3.00, 50.70, 31.10, 124.80}, {29.10, 56.00, 4917, 6.00, 51.50, 45.50, 120.00}, {26.80, 54.60, 4524, 14.30, 51.30, 41.30, 155.00}, {28.40, 55.20, 5079, 71.10, 53.50, 32.60, 200.40}, {32.30, 52.60, 3738, 15.30, 51.80, 43.80, 123.60}, {25.90, 40.60, 3354, 25.90, 51.40, 35.80, 109.90}, {25.00, 61.90, 4623, 1.00, 48.00, 36.70, 82.10}, {26.40, 59.50, 3290, .30, 50.10, 33.60, 102.40}, {28.60, 52.60, 4507, 12.80, 51.50, 41.40, 124.80}, {27.20, 52.90, 3772, 6.90, 51.30, 32.20, 134.60}, {28.80, 59.00, 3751, 1.20, 51.40, 38.50, 108.50}, {28.70, 59.90, 3853, 4.80, 51.00, 38.90, 114.00}, {27.50, 38.50, 3112, 7.20, 50.90, 30.10, 155.80}, {24.80, 42.20, 3090, 29.80, 51.40, 39.30, 115.90}, {28.00, 54.70, 3302, .30, 51.30, 38.80, 128.50}, {27.10, 52.30, 4309, 17.80, 51.10, 34.20, 123.50}, {29.00, 58.50, 4340, 3.10, 52.20, 41.00, 124.30}, {26.30, 52.80, 4180, 11.20, 51.00, 39.20, 128.60}, {26.80, 57.60, 3859, .90, 51.00, 40.10, 104.30}, {25.10, 41.00, 2626, 36.80, 51.60, 37.50, 93.40}, {29.40, 48.80, 3781, 10.30, 51.80, 36.80, 121.30}, {27.10, 59.20, 3500, .30, 50.00, 34.70, 111.20}, {28.60, 59.30, 3789, 2.70, 51.20, 34.70, 108.10}, {27.80, 65.20, 4563, 5.70, 49.30, 44.00, 189.50}, {28.00, 57.60, 3737, .30, 51.10, 34.10, 265.70}, {30.10, 52.50, 4701, 10.80, 51.60, 41.70, 120.70}, {23.90, 55.20, 3077, 1.90, 50.70, 41.70, 90.00}, {30.30, 52.70, 4712, 11.90, 52.20, 41.70, 119.00}, {26.50, 38.50, 3252, 22.20, 51.00, 29.40, 172.40}, {26.40, 50.30, 3086, .40, 49.50, 38.90, 93.80}, {27.70, 53.20, 4020, 9.10, 51.50, 38.10, 121.60}, {29.40, 51.60, 3387, 6.70, 51.30, 39.80, 108.40}, {29.00, 60.00, 3719, 1.30, 51.00, 29.00, 157.00}, {30.70, 50.20, 3971, 8.00, 52.00, 44.70, 107.30}, {29.20, 46.40, 3959, 2.70, 50.90, 40.20, 123.90}, {24.80, 37.80, 2990, 30.50, 50.90, 34.30, 103.60}, {27.40, 53.30, 3123, .30, 50.30, 38.50, 92.70}, {28.10, 41.80, 3119, 15.80, 51.60, 41.60, 99.80}, {26.40, 47.40, 3606, 12.50, 51.00, 42.00, 106.40}, {23.10, 67.30, 3227, .60, 50.60, 36.60, 65.50}, {26.80, 57.10, 3468, .20, 51.10, 39.50, 122.60}, {26.80, 47.80, 3712, 18.50, 50.60, 30.20, 124.30}, {27.50, 63.50, 4053, 2.10, 50.30, 40.30, 96.70}, {30.00, 41.60, 3061, 3.90, 51.60, 41.60, 114.50}, {27.20, 54.50, 3812, 2.90, 50.90, 40.20, 106.40}, {27.20, 62.90, 3815, .80, 50.00, 34.40, 132.20}};
这组数据是使用前面六个量来拟合最后一个变量:销量
我们来检验B2 = B5 = 0
1.首先提出简化模型和原模型
2.计算原模型的SSE和简化模型的SSE
原模型(FM)
简化模型(RM)
3.计算F
4.计算P值
p值为0.98,所以接受原假设,所以
B2 = B5 = 0
其他的检验和这个流程差不多。
以上,所有
2016/10/23