
(读书报告、研究报告)实验2
| 考核科目 | : 计量经济学 | ||
| 学生所在院(系) | : 交通科学与工程学院 | ||
| 学生所在学科 | : 交通运输规划与管理 | ||
| 学 生 姓 名 | : | ||
| 学 号 | : 10S032032 | ||
| 学 生 类 别 | : | ||
| 考核结果 | 阅卷人 | ||
第 1 页(共 7 页)
习题1:天津市粮食市场小麦批发价与面粉零售价的关系研究
数据在exercise_grain.xls中。1995 年初,天津市粮食市场的小麦批发价格首先放开。在经历5个月的上扬之后,进入平稳波动期。从1996年8月份开始小麦批发价格一路走低。至 2002年12月份,小麦批发价格降至是1160元/吨。因为面粉零售价格直接关系到居民的日常生活,所以开始时没有与小麦批发价格一起放开。当小麦批发价格一路看涨时,1995年1月至1996年6月面粉零售价格一直处于2.14元/千克的水平上。1996年7月起,面粉零售价格也开始在市场上放开。受小麦批发价格上涨的影响,一个月内面粉零售价格从2.14元/千克涨到2.74元/千克。在这个价位上坚持了11个月之后,面粉零售价格开始下降。与小麦批发价格的下降相一致,在经历了5年零7个月的变化之后,面粉零售价格又恢复到接近开放前2.14元/千克的水平上(2.17元)。以小麦批发价为因变量,面粉零售价为自变量建立回归模型。请首先采用直接线性函数形式,用RESET检验判断模型是否存在设定偏误问题,并给出解决的办法及合理的估计结果。(提示:直接拟合这些数据效果将很差,观察散点图。
解:根据题意建立以小麦批发价为因变量,面粉零售价为自变量的线性回归模型如下: (1)
利用Eviews得到自变量price和因变量sale的散点图如图1-1所示:
图1-1 自变量price和因变量sale的散点图
从散点图可以看出sale与price的关系很复杂,建立模型(1)可能效果不太好。
利用Eviews进行线性回归,得到表1-1:
表1-1 模型1线性回归表
| Dependent Variable: SALE | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 12:20 | ||||
| Sample: 1995M01 2002M12 | ||||
| Included observations: 96 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 920.6714 | 321.6663 | 2.862194 | 0.0052 |
| PRICE | 217.4882 | 133.4021 | 1.630321 | 0.10 |
| R-squared | 0.027498 | Mean dependent var | 1442.885 | |
| Adjusted R-squared | 0.017153 | S.D. dependent var | 291.2358 | |
| S.E. of regression | 288.7273 | Akaike info criterion | 14.146 | |
| Sum squared resid | 7836162. | Schwarz criterion | 14.24288 | |
| Log likelihood | -679.0939 | Hannan-Quinn criter. | 14.21105 | |
| F-statistic | 2.657946 | Durbin-Watson stat | 0.035467 | |
| Prob(F-statistic) | 0.106380 | |||
表1-2 模型1的reset检验表
| Ramsey RESET Test: | ||||
| F-statistic | 81.868 | Prob. F(2,92) | 0.0000 | |
| Log likelihood ratio | 98.14676 | Prob. Chi-Square(2) | 0.0000 | |
| Test Equation: | ||||
| Dependent Variable: SALE | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 12:31 | ||||
| Sample: 1995M01 2002M12 | ||||
| Included observations: 96 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | -5324447. | 900024.3 | -5.9153 | 0.0000 |
| PRICE | -2695456. | 447607.9 | -6.021914 | 0.0000 |
| FITTED^2 | 8.4096 | 1.418526 | 5.926218 | 0.0000 |
| FITTED^3 | -0.0019 | 0.000326 | -5.829006 | 0.0000 |
| R-squared | 0.650148 | Mean dependent var | 1442.885 | |
| Adjusted R-squared | 0.638740 | S.D. dependent var | 291.2358 | |
| S.E. of regression | 175.0470 | Akaike info criterion | 13.20876 | |
| Sum squared resid | 2819014. | Schwarz criterion | 13.31561 | |
| Log likelihood | -630.0205 | Hannan-Quinn criter. | 13.25195 | |
| F-statistic | 56.950 | Durbin-Watson stat | 0.1287 | |
| Prob(F-statistic) | 0.000000 | |||
模型修改方案:引入虚拟变量,修改模型如式(2): (2)
回归得到表1-3:
表1-3 模型2的回归统计表
| Dependent Variable: LOG(SALE) | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 13:18 | ||||
| Sample: 1995M01 2002M12 | ||||
| Included observations: 96 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 16.22219 | 0.901435 | 17.99597 | 0.0000 |
| PRICE | -7.836359 | 0.7446 | -10.46319 | 0.0000 |
| PRICE^2 | 1.761500 | 0.153271 | 11.49273 | 0.0000 |
| D1 | -0.484006 | 0.014852 | -32.58859 | 0.0000 |
| R-squared | 0.961082 | Mean dependent var | 7.254558 | |
| Adjusted R-squared | 0.959813 | S.D. dependent var | 0.199466 | |
| S.E. of regression | 0.039986 | Akaike info criterion | -3.559783 | |
| Sum squared resid | 0.147100 | Schwarz criterion | -3.452936 | |
| Log likelihood | 174.8696 | Hannan-Quinn criter. | -3.516594 | |
| F-statistic | 757.3156 | Durbin-Watson stat | 0.708809 | |
| Prob(F-statistic) | 0.000000 | |||
表1-4 模型2的reset检验统计表
| Ramsey RESET Test: | ||||
| F-statistic | 0.657372 | Prob. F(1,91) | 0.4196 | |
| Log likelihood ratio | 0.690999 | Prob. Chi-Square(1) | 0.4058 | |
| Test Equation: | ||||
| Dependent Variable: LOG(SALE) | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 13:24 | ||||
| Sample: 1995M01 2002M12 | ||||
| Included observations: 96 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 63.22046 | 57.97341 | 1.090508 | 0.2784 |
| PRICE | -37.21788 | 36.24613 | -1.026810 | 0.3072 |
| PRICE^2 | 8.350463 | 8.128097 | 1.027358 | 0.3070 |
| D1 | -2.258815 | 2.1051 | -1.031869 | 0.3049 |
| FITTED^2 | -0.252856 | 0.311866 | -0.810785 | 0.4196 |
| R-squared | 0.961361 | Mean dependent var | 7.254558 | |
| Adjusted R-squared | 0.959663 | S.D. dependent var | 0.199466 | |
| S.E. of regression | 0.040061 | Akaike info criterion | -3.546148 | |
| Sum squared resid | 0.146045 | Schwarz criterion | -3.412588 | |
| Log likelihood | 175.2151 | Hannan-Quinn criter. | -3.492161 | |
| F-statistic | 566.0357 | Durbin-Watson stat | 0.711882 | |
| Prob(F-statistic) | 0.000000 | |||
模型如下:
即 年7月面粉市场开放前;
年7月面粉市场开放后。
习题2:人口数量与医疗机构数量关系分析
数据在exercise_health.xls中,人口数量单位:万人医疗机构数量单位:个。数据来自2001年《四川省统计年鉴》。为了分析医疗机构与人口数量的关系,建立如下线性模型:Number = a+b*Population+μ (*)
(1)使用OLS估计模型(*),一般认为使用截面数据进行回归,容易存在异方差问题,请使用White检验,在α=0.05的水平下,判断是否存在异方差问题。
(2)如果存在异方差问题,请分别用残差绝对值的倒数、序列Population平方根的倒数,以及序列Population的倒数作为权重,用WLS重新估计模型,并判断采用哪种权序列回归结果较好。[提示:以序列Population平方根的倒数时,生成权序列的命令:series w2=1/@sqrt(population)]
解:(1)利用Eviews使用OLS估计模型(*):Number = a+b*Population+μ,得到表2-1:
表2-1 模型(*)的OLS估计统计表
| Dependent Variable: NUMBER | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 13:44 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | -481.62 | 288.5747 | -1.669201 | 0.1124 |
| POPULATION | 5.055763 | 0.662186 | 7.634965 | 0.0000 |
| R-squared | 0.7067 | Mean dependent var | 14.350 | |
| Adjusted R-squared | 0.750959 | S.D. dependent var | 1212.582 | |
| S.E. of regression | 605.1268 | Akaike info criterion | 15.74339 | |
| Sum squared resid | 6591211. | Schwarz criterion | 15.84297 | |
| Log likelihood | -155.4339 | Hannan-Quinn criter. | 15.76283 | |
| F-statistic | 58.29270 | Durbin-Watson stat | 1.685326 | |
| Prob(F-statistic) | 0.000000 | |||
表2-2 模型(*)的white检验统计表
| Heteroskedasticity Test: White | ||||
| F-statistic | 112.9382 | Prob. F(2,17) | 0.0000 | |
| Obs*R-squared | 18.60011 | Prob. Chi-Square(2) | 0.0001 | |
| Scaled explained SS | 24.37375 | Prob. Chi-Square(2) | 0.0000 | |
| Test Equation: | ||||
| Dependent Variable: RESID^2 | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 13:45 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 870482.1 | 125166.9 | 6.954570 | 0.0000 |
| POPULATION | -44.732 | 531.3584 | -8.402486 | 0.0000 |
| POPULATION^2 | 6.200808 | 0.506791 | 12.23544 | 0.0000 |
| R-squared | 0.930006 | Mean dependent var | 329560.5 | |
| Adjusted R-squared | 0.921771 | S.D. dependent var | 608204.0 | |
| S.E. of regression | 170111.4 | Akaike info criterion | 27.06378 | |
| Sum squared resid | 4.92E+11 | Schwarz criterion | 27.21314 | |
| Log likelihood | -267.6378 | Hannan-Quinn criter. | 27.09293 | |
| F-statistic | 112.9382 | Durbin-Watson stat | 1.762334 | |
| Prob(F-statistic) | 0.000000 | |||
(2)分别用残差绝对值的倒数、序列Population平方根的倒数,以及序列Population的倒数作为权重,用WLS重新估计模型
◆用残差绝对值的倒数作为权重,用WLS重新估计模型
建立权序列,在Eviews 命令窗口输入命令“series w1=1/abs(resid)”, 其中 abs(resid)是对残差取绝对值的函数,对加权回归后的结果进行White 检验,得到表2-3。
表2-3 加权(残差绝对值的倒数)WLS估计结果
| Dependent Variable: NUMBER | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 14:01 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Weighting series: W1 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | -344.2007 | 113.7396 | -3.026217 | 0.0073 |
| POPULATION | 4.575422 | 0.321514 | 14.23085 | 0.0000 |
| Weighted Statistics | ||||
| R-squared | 0.918374 | Mean dependent var | 1275.799 | |
| Adjusted R-squared | 0.913839 | S.D. dependent var | 2077.233 | |
| S.E. of regression | 103.7081 | Akaike info criterion | 12.21568 | |
| Sum squared resid | 193596.5 | Schwarz criterion | 12.31525 | |
| Log likelihood | -120.1568 | Hannan-Quinn criter. | 12.23511 | |
| F-statistic | 202.5172 | Durbin-Watson stat | 1.940400 | |
| Prob(F-statistic) | 0.000000 | |||
| Unweighted Statistics | ||||
| R-squared | 0.755561 | Mean dependent var | 14.350 | |
| Adjusted R-squared | 0.741981 | S.D. dependent var | 1212.582 | |
| S.E. of regression | 615.9378 | Sum squared resid | 6828829. | |
| Durbin-Watson stat | 1.526022 | |||
表2-4 加权(残差绝对值的倒数)检验统计表
| Heteroskedasticity Test: White | ||||
| F-statistic | 8.699938 | Prob. F(3,16) | 0.0012 | |
| Obs*R-squared | 12.39902 | Prob. Chi-Square(3) | 0.0061 | |
| Scaled explained SS | 1.245187 | Prob. Chi-Square(3) | 0.7422 | |
| Test Equation: | ||||
| Dependent Variable: WGT_RESID^2 | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 14:04 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 13244.26 | 1177.946 | 11.24352 | 0.0000 |
| WGT | -9658.587 | 2115.137 | -4.5613 | 0.0003 |
| WGT^2 | 2459.567 | 8.8553 | 2.843906 | 0.0117 |
| POPULATION^2*WGT^2 | -0.005763 | 0.004849 | -1.188690 | 0.2519 |
| R-squared | 0.619951 | Mean dependent var | 9679.826 | |
| Adjusted R-squared | 0.548692 | S.D. dependent var | 4945.405 | |
| S.E. of regression | 3322.298 | Akaike info criterion | 19.23156 | |
| Sum squared resid | 1.77E+08 | Schwarz criterion | 19.43070 | |
| Log likelihood | -188.3156 | Hannan-Quinn criter. | 19.27043 | |
| F-statistic | 8.699938 | Durbin-Watson stat | 0.9888 | |
| Prob(F-statistic) | 0.001182 | |||
◆用序列Population平方根的倒数作为权重,用WLS重新估计模型。
建立权序列,在Eviews 命令窗口输入命令“series w2=1/@sqrt(population)”,对加权回归后的结果进行White 检验,得到表2-5。
表2-5 加权(序列Population平方根的倒数)WLS估计结果
| Dependent Variable: NUMBER | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 14:12 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Weighting series: W2 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 227.7496 | 1.2100 | 1.386941 | 0.1824 |
| POPULATION | 3.212658 | 0.522930 | 6.143567 | 0.0000 |
| Weighted Statistics | ||||
| R-squared | 0.677092 | Mean dependent var | 1242.009 | |
| Adjusted R-squared | 0.659153 | S.D. dependent var | 544.1256 | |
| S.E. of regression | 452.4691 | Akaike info criterion | 15.16196 | |
| Sum squared resid | 3685110. | Schwarz criterion | 15.26153 | |
| Log likelihood | -149.6196 | Hannan-Quinn criter. | 15.18139 | |
| F-statistic | 37.74342 | Durbin-Watson stat | 1.584931 | |
| Prob(F-statistic) | 0.000008 | |||
| Unweighted Statistics | ||||
| R-squared | 0.662522 | Mean dependent var | 14.350 | |
| Adjusted R-squared | 0.3773 | S.D. dependent var | 1212.582 | |
| S.E. of regression | 723.7266 | Sum squared resid | 9428042. | |
| Durbin-Watson stat | 1.260066 | |||
表2-6 加权(序列Population平方根的倒数)检验统计表
| Heteroskedasticity Test: White | ||||
| F-statistic | 50.21788 | Prob. F(3,16) | 0.0000 | |
| Obs*R-squared | 18.07985 | Prob. Chi-Square(3) | 0.0004 | |
| Scaled explained SS | 51.77632 | Prob. Chi-Square(3) | 0.0000 | |
| Test Equation: | ||||
| Dependent Variable: WGT_RESID^2 | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 14:15 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | -11231950 | 1772196. | -6.337871 | 0.0000 |
| WGT | 13091373 | 2377701. | 5.5055 | 0.0000 |
| WGT^2 | -3980650. | 805923.9 | -4.939238 | 0.0001 |
| POPULATION^2*WGT^2 | 25.40176 | 2.839288 | 8.946526 | 0.0000 |
| R-squared | 0.903992 | Mean dependent var | 184255.5 | |
| Adjusted R-squared | 0.885991 | S.D. dependent var | 502688.9 | |
| S.E. of regression | 169733.9 | Akaike info criterion | 27.09871 | |
| Sum squared resid | 4.61E+11 | Schwarz criterion | 27.29785 | |
| Log likelihood | -266.9871 | Hannan-Quinn criter. | 27.13758 | |
| F-statistic | 50.21788 | Durbin-Watson stat | 1.222599 | |
| Prob(F-statistic) | 0.000000 | |||
◆用序列Population的倒数作为权重,用WLS重新估计模型。
建立权序列,在Eviews 命令窗口输入命令“series w3=1/ (population)”,对加权回归后的结果进行White 检验,得到表2-7。
表2-7 加权(序列Population的倒数)WLS估计结果
| Dependent Variable: NUMBER | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 14:17 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Weighting series: W3 | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 414.7774 | 81.26374 | 5.1040 | 0.0001 |
| POPULATION | 2.482596 | 0.409743 | 6.0512 | 0.0000 |
| Weighted Statistics | ||||
| R-squared | 0.670995 | Mean dependent var | 1050.770 | |
| Adjusted R-squared | 0.652717 | S.D. dependent var | 452.4406 | |
| S.E. of regression | 297.1371 | Akaike info criterion | 14.32090 | |
| Sum squared resid | 15228. | Schwarz criterion | 14.42048 | |
| Log likelihood | -141.2090 | Hannan-Quinn criter. | 14.34034 | |
| F-statistic | 36.71042 | Durbin-Watson stat | 1.852242 | |
| Prob(F-statistic) | 0.000010 | |||
| Unweighted Statistics | ||||
| R-squared | 0.559821 | Mean dependent var | 14.350 | |
| Adjusted R-squared | 0.535367 | S.D. dependent var | 1212.582 | |
| S.E. of regression | 826.5444 | Sum squared resid | 12297162 | |
| Durbin-Watson stat | 1.198279 | |||
表2-8 加权(序列Population的倒数)检验统计表
| Heteroskedasticity Test: White | ||||
| F-statistic | 0.805985 | Prob. F(2,17) | 0.4630 | |
| Obs*R-squared | 1.732187 | Prob. Chi-Square(2) | 0.4206 | |
| Scaled explained SS | 3.393360 | Prob. Chi-Square(2) | 0.1833 | |
| Test Equation: | ||||
| Dependent Variable: WGT_RESID^2 | ||||
| Method: Least Squares | ||||
| Date: 05/19/11 Time: 14:18 | ||||
| Sample: 1 20 | ||||
| Included observations: 20 | ||||
| Collinear test regressors dropped from specification | ||||
| Coefficient | Std. Error | t-Statistic | Prob. | |
| C | 252352.6 | 162593.0 | 1.552051 | 0.1391 |
| WGT | -357029.8 | 301729.2 | -1.183279 | 0.2530 |
| WGT^2 | 110362.9 | 88802.46 | 1.242791 | 0.2308 |
| R-squared | 0.086609 | Mean dependent var | 79461.42 | |
| Adjusted R-squared | -0.020848 | S.D. dependent var | 179301.8 | |
| S.E. of regression | 181161.2 | Akaike info criterion | 27.1 | |
| Sum squared resid | 5.58E+11 | Schwarz criterion | 27.33900 | |
| Log likelihood | -268. | Hannan-Quinn criter. | 27.21880 | |
| F-statistic | 0.805985 | Durbin-Watson stat | 1.278759 | |
| Prob(F-statistic) | 0.463000 | |||
综合比较上述三种加权方法对模型进行加权后重新估计所得结果,很明显可以知道第三种方法较好,即以序列Population平方根的倒数作为权重,用WLS重新估计模型所得结果最好。
