. Defining the model

上传人:rrsccc 文档编号:8823428 上传时间:2021-01-18 格式:DOC 页数:12 大小:231KB
返回 下载 相关 举报
. Defining the model_第1页
第1页 / 共12页
. Defining the model_第2页
第2页 / 共12页
. Defining the model_第3页
第3页 / 共12页
. Defining the model_第4页
第4页 / 共12页
. Defining the model_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《. Defining the model》由会员分享,可在线阅读,更多相关《. Defining the model(12页珍藏版)》请在三一文库上搜索。

1、F:wenkufile_temp2021-118ed7ae31f-90d3-4032-a229-2f0df0e144800d80897c0027f890400557f11ca04ac8.pdfEXERCISE ON ESTIMATING A STRUCTURAL VAR IN EVIEWSIntroductionThe aim of this exercise is to describe the basic steps to estimate a structural VAR and studying impulse response curves in EViews.We use Aust

2、ralian data for our examples in this exercise. The dataset is quarterly data spanning 21 years: 1980Q1 - 2001Q1PreparationsEnter EViews and choose: File Open dataset And select Svardata.wf1 and click OK1 Defining the modelWe define a simple model of an economy (in this case Australia) for the estima

3、te of the VAR, with four endogenous variables Variable names in dataset in parenthesis.: Inflation (INF), Real exchange rate (REER), Interest rate (INTEREST), and Output gap (GAP).Q1. Before we estimate our model, what should we do to ensure that our estimates are not biased?Answer: We use OLS to es

4、timate the VARS so we need to ensure that all variables are stationary to avoid the spurious regression problem associated with unit roots. Check for stationarity or otherwise of the four variables (see Unit Root exercise). We assume that all four variables are stationary I(0) variables for simplici

5、ty.Q2. Estimate an unrestricted VAR with all four endogenous variables in their stationary form with a constant.Answer: Use Quick, Estimate VAR or type in the command window:var var01.ls 1 5 INTEREST GAP INF REER, this command specifies a VAR estimate with the name var01 of the four variables (inter

6、est in difference note) and a lag length of 5.Vector Autoregression Estimates Date: 11/19/02 Time: 12:45 Sample(adjusted): 1981:2 2001:4 Included observations: 83 after adjusting endpoints Standard errors in ( ) & t-statistics in INTERESTGAPINFREERINTEREST(-1) 0.983846 0.001558 0.209413 0.622813 (0.

7、12698) (0.00086) (0.09527) (0.40982) 7.74811 1.81260 2.19814 1.51972.C-0.325614 0.013497 1.355519 12.57886 (1.57990) (0.01069) (1.18535) (5.09909)-0.20610 1.26221 1.14356 2.46688 R-squared 0.950040 0.809195 0.958091 0.959035 Adj. R-squared 0.933923 0.747645 0.944572 0.945821 Sum sq. resids 73.04422

8、0.003346 41.11679 760.8750 S.E. equation 1.085418 0.007346 0.814355 3.503167 F-statistic 58.94917 13.14695 70.86924 72.57452 Log likelihood-112.4692 302.1585-88.62130-209.7205 Akaike AIC 3.216126-6.774905 2.641477 5.559530 Schwarz SC 3.828121-6.162909 3.253473 6.171525 Mean dependent 9.580241-0.0002

9、63 5.088072 111.2133 S.D. dependent 4.222534 0.014624 3.458975 15.05025 Determinant Residual Covariance 0.000461 Log Likelihood (d.f. adjusted)-152.2836 Akaike Information Criteria 5.693581 Schwarz Criteria 8.141564Q3. Weve selected a lag length of 5 for this estimate but is that appropriate? Answer

10、: Adding more lags always improves the fit but it reduces the degrees of freedom and increases the danger of overfitting. An objective and replicable way to decide between these competing objectives is to maximise some weighted measures of these two parameters. This is how the Akaike Information cri

11、terion (AIC) and the Schwarz-Bayesian criterion (SBC) work. These two statistics are measures of the trade-off fit against loss of degrees of freedom so that the best lag length should minimise Some programs maximise the negative of these measures. both of them.An alternative to minimising a weighte

12、d measure of the lag length and best fit, as above, is to systematically test for the significance of each lag using a likelihood ratio test (discussed in Lutkepohl, 1991, section 4.3). Since a VAR of lag length n nests the same VAR of lag length (n-1), the log likelihood difference multiplied by th

13、e number of observations less the number of regressors in the VAR should be distributed as a Chi-sq distribution with 2k degree of freedom, c2(2k) i.e.LR = (T-m) logWn-1- logWn c2(2k)Where T is the number of observations, m is the number of regressors , logWn is the log likelihood of the VAR with n

14、lags. The idea is that for each lag length, if there is no improvement in the fit from the inclusion of this last lag then the difference in errors should not be significantly different from white noise. For our example, we use a general-to-specific specification (although some authors might specify

15、 a specific-to-general instead).(i) We start with a large lag length (say 10).(ii) For each lag, say n, note its log likelihood then calculate the log likelihood for a VAR of lag (n-1)(iii) Take the difference of the log likelihoods(iv) This difference in (iii) should be distributed as a Chi-sq dist

16、ribution with eight degrees of freedom c2(8) if it is superfluous.Q4. Test for the number of lags using the AIC, SC, and the likelihood ratio test for the appropriate lag length in the VARAnswer: with the VAR open select VIEW/ LAG STRUCTURE/ LAG LENGTH CRITERIA then enter 10 in the maximum lag speci

17、fication.The readout should be:VAR Lag Order Selection CriteriaEndogenous variables: INTEREST GAP INF REER Exogenous variables: CDate: 11/19/02 Time: 12:34Sample: 1980:1 2001:4Included observations: 78 LagLogLLRFPEAICSCHQ0-459.7154NA 1.713665 11.89014 12.01099 11.938521-169.8935 542.4870 0.001531 4.

18、869064 5.473349* 5.110970*2-152.9814 29.92147 0.001501 4.845676 5.933388 5.2811073-137.4222 25.93198 0.001531 4.856979 6.428118 5.4859354-125.4949 18.65545 0.001726 4.961408 7.015975 5.7838895-95.16905 44.32243* 0.001227* 4.594078 7.132072 5.6100846-80.29215 20.21733 0.001314 4.622876 7.644297 5.832

19、4067-60.13943 25.32009 0.001249 4.516396* 8.021245 5.9194518-51.09151 10.43991 0.001612 4.694654 8.682931 6.2912349-30.89014 21.23733 0.001606 4.586927 9.058631 6.37703210-19.16174 11.12694 0.002055 4.696455 9.651586 6.680085 * indicates lag order selected by the criterion LR: sequential modified LR

20、 test statistic (each test at 5% level) FPE: Final prediction error AIC: Akaike information criterion SC: Schwarz information criterion HQ: Hannan-Quinn information criterionThe correct lag length will depend on the criteria or measure we use. This is typical of these tests and researchers often use

21、 the criterion most convenient for their needs. The SC criterion is generally more conservative in terms of lag length than the AIC criterion. Here we assume a lag length of 1 for convenience.2 VAR identificationWe have an underlying structural equation of the form: (1)where the stochastic error ut

22、is normally distributed i.e. ut N(0,I). Unfortunately we cannot estimate this equation directly due to identification issues, but instead we have estimated an unrestricted VAR of the form: (2)Matrices A B and C are not separately observable. So how can we recover equation (1) from (2)? The solution

23、is to impose restrictions on our VAR to identify an underlying structure but kind of restrictions are these? Economic theory can sometime tell us something about the structure of the system we wish to estimate. As economists, we must interpret these structure or assumption from theory into restricti

24、ons on the VAR. Such restrictions can include for example:1. Causal ordering of shock propagation e.g. Cholesky decomposition2. Nominal variables to have no long run effect on real variables3. Long run behaviour of variables e.g. real exchange rate is constant in the long runThere are two types of r

25、estrictions, one type imposes restrictions on the short-run behaviour of the system, and the other type imposes restrictions on the long run behaviour of the system. EViews allows either short run or long run identifying restrictions, but not both types in one VAR. Moreover, it also assumes that mat

26、rix B is an invertable square matrix i.e. there are no identities in the system.3 Imposing Short Run RestrictionsTo impose short run restrictions in EViews we use equation (2):We can estimate the random stochastic residual A-1But from the residual et of the estimated unrestricted VAR: (3)Reformulati

27、ng equation (3) we have , and since , we have: (4)Equation (4) says that if there are k variables, the symmetry property above imposes k(k+1)/2 restrictions on the 2k2 unknown elements in A and B. Hence an additional k(3k-1)/2 restrictions must be imposed. EViews requires that such restriction schem

28、es must be of the form:(5)By imposing a structure on matrices A and B, we necessarily impose restrictions on the structural VAR in equation (1). An example of this specification using the Cholesky decomposition identification scheme is:A = , B = For our example, we have a VAR with four endogenous va

29、riables, therefore we require 22 = 4(3*4-1)/2 restrictions. We can impose this restriction in EViews in either matrix form or in text form. Imposing restrictions in matrix form is relatively straightforward, so we explain the text form instead. Restriction using text form is also more flexible, as w

30、e can restrict values to be equal.Q5. Impose the Cholesky decomposition. Assumes that shocks or innovations are propagated in the order of INTEREST, GAP, INF and then REER,Answer: To impose the restriction above in text format, we select Procs/Estimate Structural Factorization from the VAR window me

31、nu. In the SVAR Options dialog, select Text (or Matrix is appropriate).Each endogenous variable has an associated variable number, in our example this is:e1 for INTEREST residualse2 for GAP residualse3 for INF residualse4 for REER residualsThe identifying restriction is imposed in terms of variables

32、 es which are the residuals from the VAR estimates, and variables us which are the fundamental or primitive random (stochastic) errors in the structural system. Enter the following the text box:e1 = C(1)*u1e2 = C(2)*e1 + C(3)*u2e3 = C(4)*e1 + C(5)*e2 + C(6)*u3e4 = C(7)*e1 + C(8)*e2 + C(9)*e3 + C(10)

33、*u4To use the matrix form to impose a restriction, create two matrices with the following values (we call them A and B here)A =, B = Select the matrix specification in the structural factorisation described above and enter the names of the matrices (A and B) as appropriate:The output is:Structural V

34、AR Estimates Sample(adjusted): 1981:2 2001:4 Included observations: 83 after adjusting endpoints Estimation method: method of scoring (analytic derivatives) Convergence achieved after 12 iterations Structural VAR is just-identifiedModel: Ae = Bu where Eee=IRestriction Type: short-run pattern matrixA

35、 = 1000C(1)100C(2)C(4)10C(3)C(5)C(6)1B = C(7)0000C(8)0000C(9)0000C(10)CoefficientStd. Errorz-StatisticProb. C(1)-0.001066 0.000734-1.453529 0.1461C(2)-0.091071 0.082789-1.100032 0.2713C(3) 0.329808 0.347913 0.947961 0.3431C(4) 1.055599 12.23200 0.086298 0.9312C(5)-48.42839 51.03540-0.948918 0.3427C(

36、6) 0.965941 0.457947 2.109284 0.0349C(7) 1.085418 0.084245 12.88410 0.0000C(8) 0.007255 0.000563 12.88410 0.0000C(9) 0.808446 0.062748 12.88410 0.0000C(10) 3.372914 0.261789 12.88410 0.0000Log likelihood -152.2836Estimated A matrix: 1.000000 0.000000 0.000000 0.000000-0.001066 1.000000 0.000000 0.00

37、0000-0.091071 1.055599 1.000000 0.000000 0.329808-48.42839 0.965941 1.000000Estimated B matrix: 1.085418 0.000000 0.000000 0.000000 0.000000 0.007255 0.000000 0.000000 0.000000 0.000000 0.808446 0.000000 0.000000 0.000000 0.000000 3.3729144 Imposing Long Run RestrictionsTo impose long run restrictio

38、ns, we return to the unrestricted VAR estimate:Rearrangement of this equation reveals equation (5) below:(6)Equation (6) shows how the random (stochastic) shocks affect the long-run levels of the variables. If we define a matrix , the aggregate effect of a shock us is given by matrix C. Hence if we

39、assume that the (long run) cumulative effect of a sub-shock ui on a variable yj is zero, then column i and row j of matrix C should be zero. Knowing the values of matrix C tells us something about matrices A and B.Due to the number of restrictions required EViews also imposes the restriction that ma

40、trix A is the identity matrix. It uses matrix C to estimate matrix B.Long run imposition can be specified in matrix form (were matrix C is entered) or in text form in EViews. Going back to our example, we know that we must have at least 22 restrictions. Matrix A is assumed to be the identity matrix.

41、 This is equivalent to 16 restrictions so a further 6 restrictions must be imposed in matrix C.We have the following variable numeration:Q6. Impose the following (arbitrary) restriction to matrix C: (i) The two nominal variable (INTERST and INF) have no long run real effect, and (ii) INF shocks have

42、 no long run effect on other variables(iii) Gap is unaffected by any shocks but its ownAnswer: In matrix form this is:C = In the text form restriction is:LR1(U3)=0LR2(U1)=0LR2(U3)=0LR2(U4)=0LR4(U1)=0LR4(U3)=0The output is:Structural VAR Estimates Sample(adjusted): 1980:2 2001:4 Included observations

43、: 87 after adjusting endpoints Estimation method: method of scoring (analytic derivatives) Convergence achieved after 13 iterations Structural VAR is just-identifiedModel: Ae = Bu where Eee=IRestriction Type: long-run text formLong-run response pattern:C(1)C(3)0C(8)0C(4)00C(2)C(5)C(7)C(9)0C(6)0C(10)

44、CoefficientStd. Errorz-StatisticProb. C(1) 10.96752 0.831445 13.19091 0.0000C(2) 8.536423 0.851401 10.02632 0.0000C(3)-13.50216 2.386708-5.657231 0.0000C(4)-0.031006 0.002351-13.19091 0.0000C(5)-7.593409 1.964504-3.865306 0.0001C(6)-27.08645 7.892281-3.432018 0.0006C(7) 5.160389 0.391208 13.19091 0.0000C(8) 16.85658 1.736553 9.706919 0.0000C(9) 14.40233 1.528329 9.423579 0.0000C(10) 71.07902 5.388486 13.19091 0.0000Log likelihood -200.6625Estimated A matrix: 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.00000

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1