《实验11-多元及岭回归分析教学文案.doc》由会员分享,可在线阅读,更多相关《实验11-多元及岭回归分析教学文案.doc(39页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Good is good, but better carries it.精益求精,善益求善。实验11-多元及岭回归分析-重庆工商大学数学与统计学院统计专业实验课程实验报告实验课程:统计专业实验_指导教师:_叶勇_专业班级:_统计三班_学生姓名:_黄坤龙_学生学号:2012101328_实验报告实验项目实验11多元及岭回归分析实验日期2015-6-10实验地点81010实验目的掌握多元回归模型的变量选择,岭回归分析的思想和操作方法。实验内容1.根据数据文件估计北京市人均住房面积的影响模型。并进行相应分析。2.建立重庆市人均住房面积的影响模型,根据统计年鉴收集整理指标数据,并进行模型估计和分析。实
2、验思考题解答:1方差膨胀因子VIF的用途和计算公式是什么,其判断标准?答:方差膨胀因子是用来诊断一个序列是否存在多重共线性。自变量xj的方差膨胀因子记为VIF,它的计算方法为:VIF=1/1-Rj2。Rj2为以xj为因变量时对其他自变量回归的复测定系数。VIF越大,表明多重共线性越严重。当0VIF10时,不存在多重共线性;当10VIF100,存在较强的多重共线性;当VIF100时,存在严重的多重共线性。实验运行程序、基本步骤及运行结果:1.根据数据文件估计北京市人均住房面积的影响模型,并进行相应分析。(1).首先,要确定因变量和自变量,根据题目,因变量为:人均住房面积y自变量为:人均全年收入x
3、1人均可支配收入x2城镇储蓄存款余额x3人均储蓄余额x4国内生产总值x5人均生产总值x6基本投资额x7人均基本投资额x8(2).然后利用SPSS进行多元线性回归分析,得到结果为:模型汇总b模型RR方调整R方标准估计的误差Durbin-Watson1.994a.988.981.246341.681a.预测变量:(常量),x8,x7,x3,x6,x1,x2,x4。b.因变量:y分析:根据拟合出来的模型可以知道,可决系数为0.988,调整后的可决系数为0.981.说明解释变量解释了被解释变量变异程度的98.1%,进而可以说明模型的拟合效果好。Anovab模型平方和df均方FSig.1回归59.608
4、78.515140.325.000a残差.72812.061总计60.33619a.预测变量:(常量),x8,x7,x3,x6,x1,x2,x4。b.因变量:y分析:这是对于模型的整体显著性检验(F检验),根据结果可以看出F检验统计量为140.325,概率P值为0.0000.05,说明模型通过了显著性检验,模型的拟合是有效的。已排除的变量b模型BetaIntSig.偏相关共线性统计量容差VIF最小容差1x510.462a1.469.170.4051.809E-555278.7791.780E-5a.模型中的预测变量:(常量),x8,x7,x3,x6,x1,x2,x4。b.因变量:y分析:根据多
5、元线性回归模型的建立,将变量x5排除,它与模型中的其他解释变量存在很严重的多重共线性。系数a模型非标准化系数标准系数tSig.共线性统计量B标准误差试用版容差VIF1(常量)3.964.24116.477.000x1.000.001-.956-.817.430.0011361.278x2-.001.001-2.180-2.195.049.001980.463x3.001.002.749.627.542.0011418.704x4.000.000-2.480-2.067.061.0011431.296x6.001.0005.1556.301.000.002665.397x73.285E-7.00
6、0.3492.505.028.05219.316x8.000.000.330.972.350.009114.391a.因变量:y分析:这是对于模型的系数显著性检验(t检验),根据结果可以看出,常数项的P值为0.0000.05,没有通过显著性检验;x2的P照顾为0.0490.05,即是没有通过显著性检验;x4的P值为0.0610.05,没有通过显著性检验;x6的P值为0.0000.05,没有通过显著性检验;x8的P值为0.0090.05,通过了显著性检验。再根据方差扩大因子可以看出x1,x2,x3,x4,x6,x8存在多重共线性,只有x7不存在多重共线性。共线性诊断a模型维数特征值条件索引方差比
7、例(常量)x1x2x3x4x6x7x8117.4441.000.00.00.00.00.00.00.00.002.4843.923.09.00.00.00.00.00.00.003.04512.870.00.00.00.00.00.00.45.004.02318.096.21.00.00.00.00.00.01.085.00348.783.30.01.01.02.02.06.37.196.00199.386.00.14.00.07.17.17.10.037.000144.498.09.04.95.02.00.29.05.128.000239.240.31.80.04.89.81.48.02.5
8、8a.因变量:y残差统计量a极小值极大值均值标准偏差N预测值5.314111.12147.86201.7712320残差-.41181.38168.00000.1957720标准预测值-1.4381.840.0001.00020标准残差-1.6721.549.000.79520a.因变量:y(3).利用岭回归法对模型进行修正岭回归法就是用过增加一个偏倚量c,使得模型估计更加稳定和显著。在SPSS中岭回归的实现:新建一个syntax窗口,调入岭回归语句(引号内为该文件实际所在路径):Included:Ridgeregression.sps.岭回归命令格式:ridgeregenter=自变量列表/
9、dep=因变量/start=c初始值,默认为0/stop=c终止值,默认为1/inc=渐进步长,默认0.05)/k=c指定偏倚系数,输出详细回归结果.最后一定要有一个点.输入ridgeregenter=x1x2x3x4x6x7x8/dep=y/inc=0.01.点运行按钮run。得到结果为:R-SQUAREANDBETACOEFFICIENTSFORESTIMATEDVALUESOFKKRSQx1x2x3x4x6x7x8_.00000.98793-.955631-2.18005.748792-2.479815.154638.349141.329859.01000.94831.378142.17
10、6599-.612495-.4981011.173739.185817.140657.02000.93217.308957.200793-.400480-.301644.779982.112638.242594.03000.92303.270773.197581-.290430-.203683.608333.085146.273692.04000.91693.246958.192037-.221381-.143939.510876.073335.282129.05000.91246.230606.186853-.173260-.103246.447625.068238.281821.06000
11、.90897.218606.182354-.137464-.073540.403059.066384.277872.07000.90614.209373.178488-.109634-.050802.369855.066208.272429.08000.90378.202011.175147-.087294-.032788.344093.066928.266472.09000.90176.195980.172235-.068922-.018140.323481.068126.260469.10000.90001.190929.169671-.053524-.005982.306587.0695
12、71.254643.11000.89847.186626.167394-.040419.004278.292467.071127.249094.12000.89710.182904.165354-.029124.013054.280476.072714.243863.13000.89588.179646.163513-.019285.020647.270154.074287.238957.14000.89477.176764.161841-.010636.027280.261166.075818.234368.15000.89376.174190.160313-.002974.033125.2
13、53263.077291.230079.16000.89283.171875.158908.003862.038311.246253.078698.226069.17000.89197.169776.157611.009996.042943.239989.080036.222318.18000.89118.167863.156407.015531.047103.234353.081304.218805.19000.89045.166108.155285.020549.050859.229252.082503.215509.20000.88976.164491.154236.025117.054
14、264.224610.083636.212414.21000.88911.162995.153252.029293.057364.220365.084705.209501.22000.88850.161603.152325.033124.060197.216467.085713.206756.23000.88792.160304.151449.036648.062795.212871.086664.204165.24000.88738.159088.150620.039902.065183.209544.087561.201715.25000.88686.157946.149833.04291
15、3.067386.206453.088407.199395.26000.88636.156870.149084.045706.069423.203573.089205.197194.27000.88588.155853.148370.048304.071311.200883.089958.195104.28000.88543.154890.147687.050725.073064.198362.090669.193116.29000.88499.153975.147033.052985.074695.195994.091340.191221.30000.88457.153105.146406.
16、055100.076216.193764.091975.189415.31000.88416.152276.145802.057082.077637.191660.092574.187689.32000.88376.151483.145222.058942.078966.189671.093141.186039.33000.88338.150724.144662.060690.080210.187786.093676.184458.34000.88301.149997.144122.062336.081378.185997.094183.182944.35000.88264.149298.14
17、3599.063888.082475.184296.094662.181490.36000.88229.148626.143093.065353.083507.182675.095116.180094.37000.88194.147979.142603.066736.084478.181130.095546.178751.38000.88160.147355.142127.068045.085394.179654.095952.177458.39000.88127.146752.141665.069285.086258.178241.096338.176212.40000.88095.1461
18、69.141215.070460.087073.176889.096702.175011.41000.88063.145604.140778.071574.087844.175591.097048.173851.42000.88031.145057.140351.072633.088573.174345.097375.172731.43000.88000.144526.139936.073639.089263.173148.097685.171648.44000.87970.144011.139530.074595.089916.171995.097979.170599.45000.87939
19、.143510.139133.075506.090535.170884.098257.169584.46000.87910.143023.138746.076373.091123.169813.098520.168600.47000.87880.142548.138367.077200.091680.168779.098770.167646.48000.87851.142085.137996.077988.092209.167780.099006.166720.49000.87822.141634.137632.078740.092711.166813.099229.165820.50000.
20、87794.141193.137276.079458.093188.165878.099441.164946.51000.87765.140763.136926.080144.093642.164972.099641.164096.52000.87737.140342.136583.080799.094073.164094.099830.163269.53000.87709.139931.136247.081426.094484.163241.100009.162464.54000.87681.139528.135916.082026.094874.162414.100178.161679.5
21、5000.87653.139133.135591.082599.095245.161610.100337.160915.56000.87626.138747.135271.083148.095598.160828.100488.160169.57000.87598.138368.134956.083674.095935.160067.100630.159442.58000.87571.137996.134646.084178.096255.159327.100763.158732.59000.87544.137631.134341.084661.096560.158606.100889.158
22、039.60000.87517.137273.134041.085124.096850.157903.101007.157361.61000.87489.136921.133745.085568.097126.157217.101118.156699.62000.87462.136575.133453.085993.097390.156548.101222.156051.63000.87435.136234.133165.086402.097640.155895.101319.155417.64000.87408.135900.132881.086793.097879.155257.10141
23、0.154796.65000.87381.135570.132600.087169.098106.154634.101495.154189.66000.87355.135246.132324.087530.098322.154024.101574.153594.67000.87328.134926.132050.087876.098527.153428.101647.153011.68000.87301.134611.131780.088209.098723.152844.101715.152439.69000.87274.134301.131513.088528.098909.152273.
24、101778.151878.70000.87247.133995.131250.088835.099086.151713.101836.151328.71000.87220.133694.130989.089129.099254.151165.101889.150788.72000.87193.133396.130731.089412.099413.150627.101938.150258.73000.87166.133102.130476.089684.099565.150100.101982.149738.74000.87139.132812.130224.089945.099709.14
25、9583.102021.149227.75000.87112.132526.129974.090195.099845.149075.102057.148724.76000.87085.132243.129727.090436.099974.148577.102089.148230.77000.87058.131964.129482.090667.100097.148088.102116.147745.78000.87031.131688.129240.090889.100213.147607.102141.147267.79000.87004.131415.129000.091102.1003
26、22.147135.102161.146798.80000.86976.131145.128762.091307.100426.146670.102179.146335.81000.86949.130878.128527.091503.100523.146214.102193.145880.82000.86922.130614.128294.091692.100615.145764.102203.145432.83000.86894.130353.128062.091873.100702.145322.102211.144991.84000.86867.130095.127833.092047
27、.100783.144887.102216.144556.85000.86840.129839.127606.092213.100860.144459.102218.144128.86000.86812.129586.127380.092373.100931.144038.102217.143706.87000.86784.129335.127157.092526.100998.143622.102213.143290.88000.86757.129087.126935.092673.101060.143213.102207.142880.89000.86729.128841.126715.0
28、92814.101118.142810.102199.142476.90000.86701.128598.126497.092949.101172.142412.102188.142077.91000.86673.128357.126280.093078.101221.142021.102174.141683.92000.86645.128118.126065.093202.101267.141634.102159.141295.93000.86617.127881.125852.093320.101309.141253.102141.140912.94000.86589.127646.125
29、640.093433.101347.140877.102121.140533.95000.86561.127413.125430.093541.101382.140506.102099.140160.96000.86532.127182.125221.093645.101414.140139.102075.139791.97000.86504.126953.125013.093743.101442.139778.102050.139427.98000.86475.126726.124808.093837.101466.139421.102022.139067.99000.86447.12650
30、1.124603.093927.101488.139068.101993.1387111.0000.86418.126277.124400.094012.101507.138720.101962.138360可以看出,当偏倚系数C=0.04时,参数估计量趋于稳定,方差膨胀因子VIF小于10,共线性现象得到消除,进行详细岭回归估计:输入ridgeregenter=x1x2x3x4x6x7x8/dep=y/k=0.04.点运行按钮run。得到结果为:*RidgeRegressionwithk=0.04*MultR.9575649365RSquare.9169306076AdjRSqu.868473
31、4620SE.6462778971ANOVAtabledfSSMSRegress7.00055.3247.903Residual12.0005.012.418FvalueSigF18.92250558.00001362-VariablesintheEquation-BSE(B)BetaB/SE(B)x1.00011390.00003901.246957912.91987225x2.00010380.00003940.192036742.63494995x3-.00044223.00024457-.22138060-1.80816742x4-.00002525.00001708-.1439391
32、3-1.47795434x6.00013360.00002858.510875794.67394070x7.00000007.00000016.07333497.41832885x8.00029688.00018805.282129071.57870586Constant5.62392041.27034346.0000000020.80287204估计结果如下y=5.623920+0.00011x1+0.000103x2-0.000442x3-0.000025x4+0.000133x6+0.00000007x7+0.000296x8t20.80282.91982.6349-1.8081-1.4
33、7794.6739.41831.5787R2=0.9169由此可以看出北京人均住房面积与自变量人均全年收入x1呈正相关,即是当x1每增加一个单位时,人均住房面积就会增加0.00011;北京人均住房面积与自变量人均可支配收入x2呈正相关,即是x2每增加一个单位时,人均住房面积就会增加0.000103;北京人均住房面积与自变量城镇储蓄存款余额x3呈负相关,即是x3每增加一个单位时,人均住房面积就会减少0.000442;北京人均住房面积与自变量人均储蓄存款余额x4呈负相关,即是x4每增加一个单位时,人均住房面积就会减少0.000025;北京人均住房面积与自变量人均生产总值x6呈正相关,即是x6每增加
34、一个单位时,人均住房面积就会增加0.000133;北京人均住房面积与自变量基本投资额额x7呈正相关,即是x7每增加一个单位时,人均住房面积就会增加0.00000007;北京人均住房面积与自变量人均基本投资额x8呈负相关,即是x8每增加一个单位时,人均住房面积就会增加0.000296。2.建立重庆市人均住房面积的影响模型,根据统计年鉴收集整理指标数据,并进行模型估计和分析。(1).选取2003-2012年这10年的数据进行分析,因变量为重庆人均住房面积y,选取了4项指标来建立模型,这4个指标分别为:人均可支配收入x1、国民生产总值x2、城镇居民价格消费指数x3、住房销售价格指数x4。(2).取得
35、数据得到数据如下:年份人均住房面积y人均可支配收入x1国民生产总值x2城镇居民价格消费指数x3住房销售价格指数x4200321.198093.672555.72100.6108.5200422.769220.963034.58103.7114.7200522.1710243.993467.72100.8107200624.5211569.743907.23102.4103.2200729.2813715.254676.13104.7108200829.6815708.745793.66105.6107.2200931.4217191.16530.0198.4101.3201031.691909
36、9.737925.58103.2110.8201131.7721954.9710011.37105.3104.1201232.1722968.1411409.6102.699.2(3).利用SPSS进行多元线性回归分析,得到结果:模型汇总b模型RR方调整R方标准估计的误差Durbin-Watson1.985a.970.9461.036572.213a.预测变量:(常量),x4,x3,x2,x1。b.因变量:y分析:根据拟合出来的模型可以知道,可决系数为0.970,调整后的可决系数为0.946.说明解释变量解释了被解释变量变异程度的94.6%,进而可以说明模型的拟合效果较好。Anovab模型平方
37、和df均方FSig.1回归174.813443.70340.674.001a残差5.37251.074总计180.1869a.预测变量:(常量),x4,x3,x2,x1。b.因变量:y分析:这是对于模型的整体显著性检验(F检验),根据结果可以看出F检验统计量为40.674,概率P值为0.0010.05,即是没有通过了显著性检验;x1的P值为0.020.05,通过显著性检验;x2的P值为0.010.05,即是没有通过显著性检验;x4的P值为0.7470.05,没有通过显著性检验。再根据方差扩大因子可以看出x1,x2存在多重共线性,x3,x4不存在多重共线性。(4).模型优化变量x3、x4没有通过
38、显著性检验,所以可以进行以下3种检验:剔除变量x3,对变量x1、x2、x4进行分析,得到结果为:模型汇总b模型RR方调整R方标准估计的误差Durbin-Watson1.985a.970.955.947342.254a.预测变量:(常量),x4,x1,x2。b.因变量:y分析:根据拟合出来的模型可以知道,可决系数为0.970,调整后的可决系数为0.955.说明解释变量解释了被解释变量变异程度的95.5%,进而可以说明模型的拟合效果较好,比原来的模型拟合有所提高。Anovab模型平方和df均方FSig.1回归174.801358.26764.925.000a残差5.3856.897总计180.18
39、69a.预测变量:(常量),x4,x1,x2。b.因变量:y分析:这是对于模型的整体显著性检验(F检验),根据结果可以看出F检验统计量为64.925,概率P值为0.0000.05,即是没有通过了显著性检验;x1的P值为0.010.05,即是没有通过显著性检验。再根据方差扩大因子可以看出x1,x2存在多重共线性,x4不存在多重共线性。综合应该剔除变量x4。剔除变量x4,对变量x1、x2、x3进行分析,得到结果为:模型汇总b模型RR方调整R方标准估计的误差Durbin-Watson1.985a.969.954.957222.334a.预测变量:(常量),x3,x2,x1。b.因变量:y分析:根据拟
40、合出来的模型可以知道,可决系数为0.969,调整后的可决系数为0.954.说明解释变量解释了被解释变量变异程度的95.4%,进而可以说明模型的拟合效果较好,比原来的模型拟合有所提高。Anovab模型平方和df均方FSig.1回归174.688358.22963.551.000a残差5.4986.916总计180.1869a.预测变量:(常量),x3,x2,x1。b.因变量:y分析:这是对于模型的整体显著性检验(F检验),根据结果可以看出F检验统计量为63.551,概率P值为0.0000.05,即是没有通过了显著性检验;x1的P值为0.010.05,即是没有通过显著性检验。再根据方差扩大因子可以看出x1,x2存在多重共线性,x3不存在多重共线性。综合应该剔除变量x3。剔除变量x3、x4,对变量x1、x2进行分析,得到结果为:模型汇总b模型RR方调整R方标准估计的误差Durbin-Watson1