《计量经济学课堂案例.doc》由会员分享,可在线阅读,更多相关《计量经济学课堂案例.doc(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、计量经济学 第一章一元线性回归模型2.6计量经济学一元回归案例分析(课堂例题)一保险公司希望确定居民住宅区火灾造成的损失数量与该住户到最近的消防站的距离之间的关系,以便准确地定出保险金额。下表列出火灾事故的损失及火灾发生地与最近的消防站的距离。序号火灾损失Y距消防站 距离X128.14.3219.81.8331.37.6423.53.8527.55.1636.29.5724.13.7822.32.5917.51.61031.36.31122.43.11235.39.51345.214.41435.49.31535.17.5合计43590均值296请:1)建立线性回归模型并进行相关的计算; 2)
2、用最小二乘法估计参数1与2; 3)给出样本回归方程; 4)进行方差分析5)进行回归方程的显著性检验F0.05(1,13)=4.67;F0.01(1,13)=9.07; 6)计算相关系数并进行相关系数检验r0.05(13)=0.514;r0.01(13)=0.647)计算样本的决定系数; 8)计算总体方差的估计值; 9)计算参数1与2的标准差的估计值; 10)给出参数1与2的95%的置信区间 t0.025(13)=2.16; 11)当X0=4.5公里时给出总体与个别值的点预测值; 12)计算与估计值; 13)给出总体与个别值的95%的区间预测。解:X、Y散点图如下: 以下计算保留3位小数1)一元
3、线性回归模型为:Yt=1+2Xt+t (t=12,n)列表计算如下序号火灾损失Y距消防站 距离XY的平方X的平方XYLyyy2Lxxx2Lxy-xy128.14.3789.6118.49120.830.812.891.53219.81.8392.043.2435.6484.6417.6438.64331.37.6979.6957.76237.885.292.563.68423.53.8552.2514.4489.330.254.8412.1527.55.1756.2526.01140.252.250.811.35636.29.51310.4490.25343.951.8412.2525.272
4、4.13.7580.8113.6989.1724.015.2911.27822.32.5497.296.2555.7544.8912.2523.45917.51.6306.252.5628132.2519.3650.61031.36.3979.6939.69197.195.290.090.691122.43.1501.769.6169.4443.568.4119.141235.39.51246.0990.25335.3539.6912.2522.051345.214.42043.04207.36650.88262.4470.56136.081435.49.31253.1686.49329.22
5、40.9610.8921.121535.17.51232.0156.25263.2537.212.259.15合计4359013420.38722.342986.05805.38182.34376.05均值296894.69248.156199.0753.69212.15625.07由上表知:n=15=90,=6, =722.34,= -n()2=182.34=435,=29, =13420.38, =-n()2=53.692=987708.68, = -n=376.052)用最小二乘法进行参数估计=/=/=/=276.05/182.34=2.062=-=29-2.0626=16.628 3)
6、样本回归方程 =+=16.628+2.062 (t=1,2,n) 或 =+=16.628+2.0624)方差分析 = + TSS(总离差平方和) = RSS(残差平方和) + ESS(回归平方和)TSS=805.38ESS=2.062376.05=775.415RSS= TSS- ESS=-=805.38-775.415=29.965方差来源平方和自由度均方F-统计量回归775.4151MESS=ESS/1=775.415F=MESS/MRSS=336.406残差29.96513MRSS=RSS/13=2.305总离差805.38145)回归方程的显著性检验 (1)=0.05 F0.05(1,
7、13)=4.67 (2)=0.01 F0.01(1,13)=9.07由方差分析表知:F=336.406 F0.01(1,13)=9.07 F0.05(1,13)=4.67拒绝原假设H0,认为解释变量与被解释变量间有显著的线性关系。6)相关系数的显著性检验 =/=/=/=376.05/=376.05/383.214=0.981由于 n=15,(1)=0.05 r0.05(n-2)=r0.05(13)=0.514(2)=0.01 r0.01(n-2)=r0.01(13)=0.641显然,r=0.981 r0.05(13)=0.514 r0.01(13)=0.641说明解释变量与被解释变量之间存在十
8、分显著的线性关系。7)样本的决定系数 R=r2=/=0.9628)总体方差的估计 =所以 =2.305 =1.5189)计算参数的标准差的估计值 =1.518/=0.112=1.518(1/15+62/182.34)1/2=0.78010)给出参数95%的置信区间由: N(0,1), 所以 t=/ = t(n-2)同理 t= t(n-2)给定 =0.05,t0.025(13)= 2.16所以 与的95%的置信区间分别为()=(16.628-2.160.780,16.228+2.160.780) =(14.943, 17.913)()=(2.062-2.160.112,2.062+2.160.1
9、12 ) = (1.820, 2.304)11)当X0=4.5公里时给出总体与个别值的点预测值由于样本回归方程 =+=16.628+2.062 (t=1,2,n) 或 =+=16.628 + 2.062(=0.780) (=0.112) 所以当X0=4.5公里时, 总体与个别值的点预测值为=16.628 +2.062=16.628+2.0624.5=25.90712)计算与估计值 由于: =0,其中0=所以:=0=2.3051/15+(4.5-6)2/12.156=2.3050.252=0.581 (0=0.252, =0.502 ) =0.762 由于:=1 ,其中1=1+0=1.252 ,
10、 =1.119 所以:=1=2.305(1+0.252)=2.886 =1.69913)给出总体与个别值的95%的区间预测(1)总体的95%的区间预测由于: = N(0,1), 所以: /= t(n-2)给定: =0.05,t0.025(13)= 2.16 所以:=0.95由此知总体的95%的区间预测为() =(25.907-2.160.502,25.907+2.160.502)=(24.823,26.991)(2)个别值的95%的区间预测由于: = N(0,1), 所以: /= t(n-2)给定: =0.05,t0.025(13)= 2.16 所以:=0.95由此知总体个别值的95%的区间预
11、测为()=(25.907-2.161.119,25.907+2.161.119)=(23.490,28.324) 利用SPSS计算结果1)序列图2)散点图3)回归结果Variables Entered/RemovedModelVariables EnteredVariables RemovedMethod1消防站的距离X(公理).Entera All requested variables entered.b Dependent Variable: 火灾损失Y(千元) Model SummaryModelRR SquareAdjusted R SquareStd. Error of the E
12、stimateDurbin-Watson1.958.918.9122.39512.358a Predictors: (Constant), 消防站的距离X(公理)b Dependent Variable: 火灾损失Y(千元) ANOVAModelSum of SquaresdfMean SquareFSig.1Regression836.9401836.940145.892.000Residual74.577135.737Total911.51714a Predictors: 消防站的距离X(公理)b Dependent Variable: 火灾损失Y(千元)CoefficientsUnstandardized CoefficientsStandardized CoefficientstSig.ModelBStd. ErrorBeta1(Constant)9.1241.5595.851.000消防站的距离X(公理)5.166.428.95812.079.000a Dependent Variable: 火灾损失Y(千元)71