《2023年实验报告二误差修正模型的建立与分析.docx》由会员分享,可在线阅读,更多相关《2023年实验报告二误差修正模型的建立与分析.docx(9页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、实验报告(二)一一误差修正模型(ECM)的建立与分析一、 单位根检查:1、绘制cons与GDP的时间序列图:从时间序列图中可以看出,cons与GDP随时间增长都呈上升趋势,表现出非 平稳性。2、对c o ns进行单位根检查:-Augmented Dickey-Fuller Unit Root Test on CONSNull Hypothesis: CONS has a unit root Exogenous: Constant Linear Trend Lag Length: 0 (Automatic based on SIC. MAXLAG=0)t-StatisticProb*Augmen
2、ted Dickey-Fuller test statistic-0 2276980 9888Test critical values:1% level-4.3393305% level-3.58752710% level-3.229230MacKinnon (1996) one-sided p-values.Augmented Dickey-Fuller Test Equation Dependent Vanable: D(CONS)Method Least SquaresDate: 06/05/15 Time: 16:26Sample 1980 2006Included observati
3、ons: 27VariableCoeffiaentStd. Errort-StatisticProb.CONS(-1)-0.0106860.046929-0.2276980.8218c-22.3104653,58902-0 4163250 6809TREND(1980)19.255199.6302451.9994500.0570R-squared0.604832Mean dependent var208.0637Adjusted R-squared0 571901S D. dependent var175 2520S.E. of regression114.6661Akaike info cr
4、iterion12.42637Sum squared resid315559.6Schwarz criterion12.57035Log likelihood-164.7559Hannan-Quinn criter.12.46918F-statlstic18.36680Durbin-Watson stat0.702123Prob(F-statistic)0.000015先选择对原序列(1 evel)进行单位根检查,根据cons与GD P的时间序列 图的走势,选择trend an d int e r cept的检查方法,在maximum 1 ags中填写AD F检查方法的滞后期为0,从上表中可以
5、看出,P值为0. 98 8 8,大于0. 05 的显著性水平,说明原序列是非平稳的。-Augmented Dickey-Fuller Unit Root Test on D(CONS)Augmented Dickey-Fuller Test Equation Dependent Variable: D(CONS,2) Method: Least SquaresDate: 06/05/15 Time: 16:28Sample: 1980 2006Included observations. 27VariableCoefficientStd. Errort-StatisticProB.D(CONS
6、(-1)-0.3396530.159881-2 1244130 0441C-42601563296514-0 12923208983TREND(1980)6.7630043.32237420355940 0530R-squared0.170677Mean dependentvar19.67074Adjusted R-squared0.101567S.D. dependent var92.58964S.E. of regression87.76175Akaike info criterion11.89157Sum squared resid184851.0Schwarz criterion12.
7、03555Log likelihood-157.5362Hannan-Quinn enter.11.93438F-statistic2.469635Durbin-Watson stat1.340751Prob(F-statistic)0.105848Null Hypothesis: D(CONS) has a unit root Exogenous: Constant Linear Trend Lag Length: 0 (Automatic based on SIC. MAXLAG=0)t-StatisticProb.*Auamented Dickey-Fuller test statist
8、ic-2.1244130.5099Test critical values:1 % level-4 3393305% level-358752710% level-3 229230,MacKinnon (1996) one-sided p-values选择cons的一阶差分(Is t )和t r end and int ere ept,从上表中可以 看出,通过一阶差分后,P值(=0.509 9 )仍然没有通过0.0 5的置信水平检查, 说明是不平稳的,需要继续改善。Augmented Dickey-Fuller Unit Root Test on D(CONS)Null Hypothesis:
9、 D(CONS) has a unit root Exogenous: Constant. Linear Trend Lag Length 1 (Automatic based on SIC. MAXLAG=8)t-StatisticProb*Augmented Dickey-Fuller test statistic-3.3525660.0801Test critical values:1% level 5% level 10% level-4 356068 -3.595026 -3 233456MacKinnon (1996) one-sided p-valuesAugmented Dic
10、key-Fuller Test EquationDependent Variable: D(CONS,2)Method: Least SquaresDate: 06/05/15 Time: 16:30Sample (adjusted): 1981 2006Included observations. 26 after adjustmentsVariableCoefficientStd. Errort-StatisticProb.D(CONS(-1) D(CONS(-1),2) C TREND(1980)-0.541427 0 519162-12.002709 4945970.161496 01
11、88830 32.11389 3 239532-3.3525662.749357-0.3737542.9308540.0029001170.712200077R-squaredAdjusted R-squared S.E. of regression Sum squared resid Log likelihood F-statistic Rrob(F-statistlc)0 383330 0299239 79.00969 1373357 -148.32954558502 0.012491Mean dependent var S.D dependentvar Akaike info crite
12、rion Schwarz criterion Hannan-Quinn criter. Durbin-Watson stat20.18885 94 38336 11.7176611 91121 11.77339 1 944826再试用ADF检查,在滞后期(maximum lags)中填入8,选择一阶差分和tr end an d i nter c e pt,得出上表,可以看出P值=0. 0 801,大于0. 0 5,没有通过0. 05的置信水平检查,说明是不平稳的,需要继续改善。Augmented Dtckeyuller Unit Rootlest on D(CdNS,2)Null Hypoth
13、esis: D(CONS,2) has a unit root Exogenous: Constant. Linear TrendLag Lengtn. 1 (Automatic based on SIC. MAXLAG=6),MacKinnon (1996) one-sided p-valuest-StatisticProb.*AuQmented Dickey-Fuller test statistic-4 22959200137Test critical values:1% level5% level 10% level-4 374307-3.603202-3.238054Augmente
14、d Dickey-Fuller Test EquationDependent Variable: D(CONS,3)Method: Least SquaresDate: 06/15/15 Time: 11:19Sample (adjusted): 1982 2006Included observations. 25 after adjustmentsVariableCoefficientStd. Errort-StatisticProb.D(C0NS(-1),2)-1 0565980 249811-4 2295920.0004D(CONS(-1),3)0.3806560 2019131.885
15、2450.0733C0.31858940.151370.0079350.9937TREND(1980)1.5172772.5701220.5903520.5613R-squared0 471808Mean dependentvar2040400Adjusted R-squared0 396352SD. dependentvar118.3186S.E. of regression91.92740Akaike info aiterion12.02552Sum squared resid177463.6Schwarz criterion12.22054Log likelihood-146.3190H
16、annan-Quinn enter12.07961F-statistic6252752Durbin-Watson stat1 882590Rrob(F-statistic)0 003343再试用ADF检查,在滞后期(maximum lags)中填入6 ,选择二阶差分和trend an d i n terc e pt,得出上表,可以看出P值=0 . 0 1 37,小于0.05,通过0.05的置信水平检查,说明是平稳的。3、对GDP进行单位根检查:Augmented Dickey-Fulier Unit Root Test on GDPNull Hypothesis: GDP has a unit
17、 root Exogenous: Constant. Linear Trend Lag Length. 0 (Automatic based on SIC, MAXUG=0)(-StatisticProb.,Augmented Dickey-Fuller test statistic20206041 0000Test critical values:1 % level 5% level 10% level-4.339330-3.587527-3229230*MacKinnon (1996) one-sided p-values.Augmented Dickey-Fuller Test Equa
18、tionDependent Variable: D(GDP)Method: Least SquaresDate: 06/05/15 Time: 16:33Sample. 1980 2006Included observations: 27VariableCoefficientStd. Errort-StatisticProb.GDP(-1) C TREND(1980)0.082513-20.9387917586370.040836132.041720.376172.020604 -0.15857708630850.05460.87530.3966R-squaredAdjusted R-squa
19、red S.E. of regression Sum squared resid Log likelihood F-statistic Prob(F-statistic)0.7396550.717960284.26741939391.-189.269034.092680.000000Mean dependent var S.D. dependent var Akaike info criterion Schwarz enterion Hannan-Quinn criter. Durbin-Watson stat552 2419 535.2681 14.24215 1438613 14.2849
20、6 0.871214先选择对原序列(level)进行单位根检查,根据c o n s与GDP的时间序列 图的走势,选择trend and i n tercep t的检查方法,在m a x imum lags 中填写ADF检查方法的滞后期为0 ,从上表中可以看出,P值为1.00 0 0,大于 0.05的显著性水平,说明原序列是非平稳的。Augmented DickeyFullerUniTRoofTeston D(GDP)Null Hypothesis: D(GDP) has a unit root Exogenous Constant, Linear Trend Lag Length 0 (Aut
21、omatic based on SIC, MAXLAG=O)t-StatisticProb.aAuqmntGd Dickey-Fuller test statistic-2.0339810.5574Test critical values:1% IGVGI 5% level 10% level-4.339330-3.587527-3.229230,MacKinnon (1996) one-sided p-values.Augmented Dickey-Fuller Test EquationDependent Variable: D(GDP,2)Method: Least SquaresDat
22、e: 06/05/15 Time: 16 35Sample 1980 2006Included observations: 27VariableCoefficient Std Error t-Statistic Prob.D(GDP(-1)-0.3302010.162342-2.0339810.0531C-67.2702792.12626-0.7301960.4723TREND(1980)22.4172710.047702.2310860.0353R-squared0.175670Mean dependent var62.41185Adjusted R-squared0.106976S.D.
23、dependent var248.8883S.E. of regression235.1993Akaike info cntenon13.86318Sum squared resid1327649.Schwarz cntenon14.00716Loq likelihood-184.1530Hannan-Quinn enter.13.90600F-statistic2.557278Durbin-Watson stat1.620664Prob(F-statistic)0.098449选择GDP的一阶差分(I s t) trend an d inter ccp t ,从上表中可以 看出,通过一阶差分
24、后,P值( = 0.5 5 7 4)仍然没有通过0.05的置信水平检查, 说明是不平稳的,需要继续改善。Augmented Dickey-Fuller Unit Root Test on D(GDP)Null Hypothesis D(GDP) has a unit root Exogenous: Constant, Linear Trend Lag Length: 3 (Automatic based on SIC, MAXLAG=8)t-StatisticProb.,Augmented Dickey-Fuller test statistic-3.0595780.1379Test alti
25、cal values:1 % level 5% level 10% level-4.394309-3.612199-3.243079*MacKinnon (1996) one-sided p-values.Augmented Dickey-Fuller Test EquationDependent Variable. D(GDP.2)Method: Least SquaresDate: 06/05/15 Time: 16:37Sample (adjusted): 1983 2006Included observations 24 after adjustmentsVariableCoeffic
26、ientStd. Errort-StatisticProb.D(GDP(-1)-0.8031070.262489-3.0595780.0067D(GDP(-1).2)0.7876080.2624293.0012190.0077D(GDP(-2).2)0.0326390.2322320.1405470.8898D(GDP(-3).2)0.6994810.2250683.1078630.0061C-195.7543110.6699-1.7688130.0939TREND(1980)42.6007313.194273.2287310.0047R-squared0.531657Mean depende
27、nt var69,61667Adjusted R-squared0.401562S.D. dependent var263.6910S E of regression203.9882Akaike info enterion13.68632Sum squared resid749001.4Schwarz criterion13.98083Log likelihood-158.2358Hannan-Quinn alter.13.76445F-statistic4 086673Durbin-Watson stat2175517Prob(F-statistic)0.011790再试用ADF检查,在滞后
28、期(maximum lags)中填入8,选择一阶差分和Iren d a nd intercept,得出上表,可以看出P值=0. 1 379,大于0. 0 5,仍然没有通过5%的置信水平检查,说明是不平稳的,需要继续改善。Augmented Dickey-Fuller Unit Root Test on D(GDP,2)Null Hypothesis D(GDP,2) has a unit root Exogenous: Constant. Linear Trend Lag Length: 1 (Automatic based on SIC. MAXLAG=8)t-StatisticProb.A
29、ugmented Dickey-Fuller test statistic-4 9320470.0029Test critical values:1% level 5% level10% level-4.374307-3.603202-3.238054.MacKinnon (1996) one-sided p-valuesAugmented Dickey-Fuller Test EquationDependent Variable: D(GDP,3)Method: Least SquaresDate: 06Z05/15 Time: 16:39Sample (adjusted): 1982 20
30、06Included observations 25 after adjustmentsVariableCoefficientStd. Errort-StatisticProb.D(GDP(-1).2)D(GDP(-1).3) C TREND(1980)-1.358521 0.425996-3391812 8 8934690.275448 0.199749 108 1723 7127444-4.932047 2.132662-0.3135561 2477780.0001 0 0449 0.7570 0 2258R-squaredAdjusted R-squared S.E. of regres
31、sion Sum squared resid Log likelihood F-statistic Prob(F-statistic)0.5677450.505994246.4855 1275858-1709766 9194138 0.000441Mean dependent var S.D. dependent var Akaike info aitenon Schwarz crrterion Hannan-Quinn criter Durbin-Watson stat2.623200350.691613.9981314.1931514,052221.734598选择二阶差分和tren d
32、and in t crccpt,得出上表,可以看出P值二0.002 9 ,小于0. 0 5,通过5%的置信水平检瓷,表白在5%的显著性水平下可以拒绝原假设,进而认为GDP序列通过二阶差分后变为平稳序列。二、格兰杰检查:Pairwise Granger Causality TestsDate: 06/05/15 Time: 16:43Sample: 1980 2006Lags: 6Null Hypothesis:ObsF-StatisticProb.GDP does not Granger Cause CONS234.052070.0254CONS does not Granger Cause
33、GDP3.015130.0597表中原假设“GDP does no t Granger Cause cons”意为 GDP不是 引起c o n s变化的Gran g er因素,P值=0. 02 5 4,小于0. 05的显著性水平,故 接受肯定假设。最后结论:GDP是引起消费变化的因素。三、协整检查:Dependent Variable: GDP Method: Least Squares Date: 06/05/15 Time: 16:46 Sample: 1980 2006 Included observations: 27VariableCoefficientStd. Error t-St
34、atisticProb.CONS2.4988500.05371246.522870.0000C-455.6457145.0353-3.1416200.0043R-squared0.988581Mean dependent var4728.058Adjusted R-squared0.988124S.D. dependentvar4427.049S.E. of regression482.4371Akaike info criterion15.26677Sum squared resid5818640.Schwarz criterion15.36275Log likelihood-204.101
35、3Hannan-Quinn criter.15.29531F-statistic2164.377Durbin-Watson stat0.154918Prob(F-statistic)0.000000将co n s和GDP进行回归,得出上表,模型拟合优度很高R-squar e d = 0.98 8581, D. W检查没有通过,模型存在正自相关,则模型如用预测会不可靠。Augmented Dickey-Fuller Unit Root Test on RESNull Hypothesis: RES has a unit rootExogenous: NoneLag Length: 3 (Auto
36、matic based on SIC. MAXLAG=4)t-StatisticProb.*Augmented Dickey-Fuller test statistic-3.1693070.0029Test critical values:1% level5% level 10% level-2.669359-1.956406-1.608495,MacKinnon (1996) one-sided p-values.Augmented Dickey-Fuller Test Equation Dependent Variable. D(RES) Method: Least SquaresDate
37、: 06/05/15 Time: 16:48Sample (adjusted). 1984 2006Included observations 23 after adjustmentsVariableCoefficientStd. Errort-StatisticProb.RES(-1)-01731790.054643-3.1693070.0050D(RES(-1)1.2284370.1768236.9472600.0000D(RES(-2)-0 5606230.276301-2.0290260.0567D(RES(-3)0 7101500.2453702.8941990.0093R-squa
38、red0862027Mean dependent var42.35313Adjusted R-squared0840241S D dependentvar197.4925S.E. of regression78.93739Akaike info aiterion11.73196Sum squared resid118391.1Schwarz aitenon11.92944Log likelihood-1309175Hannan-Quinn criter11 78162Durbin-Watson stat1.707276对r es i d进行平稳性检查,提取残差项,对re s原序列(level)
39、进行ADF检查,得出res是I (0)平稳过程,cons与GDP序列是协整的。(置信水平为5%)Dependent Variable: LOG(CONS)Method: Least SquaresDate: 06/06/15 Time: 09:34Sample: 1980 2006Included observations: 27VariableCoefficientStd. Error t-StatisticProb.C0.0498720.0375151.3293990.1968LOG(CONS(-1)0.8548560.1092207.8268910.0000LOG(GDP)0.90948
40、50.06253614.543460.0000LOG(GDP(-1)-0.7841200.127493-6.1502880.0000R-squared0.999609Mean dependent var7.170055Adjusted R-squared0.999558S.D. dependent var1.073234S.E. of regression0.022560Akaike info criterion-4.609290Sum squared resid0.011706Schwarz criterion-4.417314Log likelihood66.22541Hannan-Qui
41、nn criter.-4.552205F-statistic19605.54Durbin-Watson stat1.093371Prob(F-statistic)0.000000由于c ons与GDP具有协整关系,故可建立ECM模型。在主命令窗口输入:LS log(co n s ) c 1 og (cons (- 1 ) ) 1 og(GDP) log (GDP(-1)结果如上图所ZjXo模型表达式为:1 n(C O nst)=-o. 04 9 8 7 +0. 9 0 94 8 1 n(GDP 1 )+0. 854 8 ln( C onst-i)-0. 7 8411n ( GDP t-1) +
42、et其中 R aquared = 0 . 9 9 9 6, A djus t ed R-squ a red = 0 . 9 9 95, F=19605. 54由于cons与GDP具有协整关系,故可建立ECM模型。在主命令窗口输入:LS1 o g (c o ns)c log(c ons (-1) lo g (GDP) log (GDP (T)结果如上图所示。模型表达式为:In (con s t )= 0. 0 4987+ 0.9 0 9481n(GDPl)+0. 8 5 4 8 ln(co n st-l)-0.7 8 411n(GDPt-l)+ e t其中 R -aquar e d = 0. 99 9 6 , Adjuste d R -squa r e d =0. 9995, F=19605. 54ECM 形式为 : yt= 0 . 0 4987+0. 9 0 9 4 85 x t + (-0. 145 1 44) (yt-1-0. 34 3 589-0. 863 7 284x t - 1 )+ut