Home

II test user manual

image

Contents

1. The reduced form is x Ax Be 10 where x Y Z 4 a are the auxiliary variables The coefficient matrices A and B are derived from 9 Re writing it in declaration order x Dx Eg 11 Or D D E Y api 2 Ym i lle 12 A 0 D iz E We find that y D Y a E D Z 4 EE EE EE Dzy E5 13 EE 2 since E E D D So 5 where E B oo_ dr inv_order_var D zeros M endo nbr M nstatic A 1 M_ nspred zeros M_ endo_nbr M nfwrd D D oo_ dr inv_order var oo_ dr inv_order var z EE y D Ya 14 If the number of independent structural residuals is equal to the number of endogenous variables E is a squared matrix so the residuals are obtained through the above equation If the number of independent structural residuals is less than the number of endogenous variables we make use of part of the endogenous variables and part of Ea which makes E a squared matrix and obtain the residuals through the above equation Then the model innovations are 1 E z D z 15 We can also estimate rhos through the exact method The exact method is conducted through iteration We start with a set of rhos most easily derived from LIML Get a new set of residuals and rhos from the equations below repeat until convergence z Rz 16 This procedure is implemented by Get_Res_ Exact function residual inno rho_ est GetRes Exact fname act_ dat
2. Testing Macro Models Using Indirect Inference David Meenagh Yongdeng Xu 1 Introduction Indirect Inference provides a classical statistical inferential framework for testing a model The aim is to compare the performance of the auxiliary model estimated on the simulated data derived from the model with the performance of the auxiliary model when estimated from the actual data In practice we use a VAR as the auxiliary model but you could also use IRFs and moments If the structural model is correct then its predictions about the time series properties of the data should match those based on actual data We choose a VAR as the auxiliary model because the solution to a log linearised DSGE model can be represented as a restricted VARMA model and this can be closely represented by a VAR A level VAR can be used if the shocks are stationary In what follows we do not assume that the data is stationary however if you wish only to use stationary data then you may ignore the remarks below about trends and tests of non stationarity of the error processes 2 Model Evaluation by Indirect Inference The method of evaluating a model by Indirect Inference is carefully explained for users in Le et al 2015 which should be cited when using any of these programmes The method was introduced and refined in a series of papers referred to there The criterion we use when evaluating the model is the Wald test of the differences between the vector of relevant VAR co
3. a 3 2 LIML unknown shocks Under the LIML method we only need to know the structural parameters A and We do not require to know the shock process and error distribution We then get the model residuals from LIML Suppose the model is AE Ya AY 2 17 Z z rE 18 where y are endogenous variables and zZ are model residuals which may be represented by the VAR E are shock innovations and are exogenous variables Then we get model shocks from Z AE Ya T AY 19 where E Yiu is estimated from LIML If the equation has expectations in it we need to estimate the expected values To do this we use the robust instrumental variables methods of McCallum 1976 and Wickens 1982 with the lagged endogenous data as instruments In practice we estimate a VAR of all the expected variables and use this to calculate the expectations In implement the method we make use dynare function fname_dynamic m When we run dynare fname mod Dynare also produces a fname_dynamic m file This is a function that generates lhs rhs of equation 17 and 18 To get model residuals Z we input Ay 4o Via y and let z to be zero Then the Ihs rhs in equation 17 are the model residuals After we get the model residuals Z we may need to determine the stationarity of the residuals and the structure of the shock process The default process is AR 1 We then re estimate the AR 1 process get AR coeffici
4. above giving the Wald as the output Trans Wald CalcWald act_data fname coef The function CalcWald includes the three functions that calculate Wald statistics as stated in section 2 GetRes Exact Boots data Wald_stationary Theinputis actual data and starting coefficients and output is the transformed Wald The fminsearchbnd algorithm supplied in Matlab is suggested as it has been found to find global minima In practice it is better to minimise the Transformed Wald because it is easier to see if we have found a set of parameters where the model is not rejected as we are just looking to see if we found a Transformed Wald less than 1 645 II_coef fminsearchbnd II_coef CalcWald act_data fname II_coef coef 1lb ub options References 1 Davidson J Meenagh D Minford P amp Wickens M 2010 Why crises happen nonstationary macroeconomics Working Paper E2010 13 Cardiff Economics Working Papers Cardiff University 2 Juillard M 2001 Dynare a program for the simulation of rational expectations models Com puting in economics and finance 213 Society for Computational Economics 3 Le V P M Meenagh D Minford P Wickens M 2011 How much nominal rigidity is there in the US economy testing a New Keynesian model using indirect inference Journal of Economic Dynamics and Control 35 12 2078 2104 4 Le V P M Meenagh D Minford P Wickens M Xu Yongdeng 2015 Testing macro model
5. d Wald 5 The power of the II Wald test The power of the IIW test is studied by Le et al 2015 We examine the power of the Wald test by positing a variety of false models increasing in their order of falseness We generate the falseness by introducing a rising degree of numerical mis specification for the model parameters Thus we construct a False DSGE model whose parameters were moved x away from their true values in both directions in an alternating manner even numbered parameters positive odd ones negative similarly we alter the higher moments of the error processes standard deviation by the same x We may think of this False Model as having been proposed as potentially true following previous calibration or estimation of the original model The transformed Wald is calculated each time The power of the test is the probability of rejecting a false model by the data or the probability that Transformed Wald is bigger than 1 645 s 1 1000 pvalue s Wald s Trans Wald s Wald_stationary act_data var_no boots data var_no var_order var_var lance power mean Trans Wald gt 1 645 6 Model Estimation by II As mentioned earlier the Wald statistic measures the distance between the data and the model Therefore to estimate the model parameters we can use any minimising algorithm to minimise the Wald for the actual data The function to minimise takes the coefficients as an input and then does Steps 1 3
6. der the following autoregressive process Az PAz _ E 5 And we re estimate this error process and get the model innovation for productivity shocks For other stationary shocks we use an AR 1 process in levels and get the model innovation as usual 3 f you find any other non stationary shocks when you implement the test you can use same error process But you had better not rely only on ADF test Make your own judgement and do not use too many nonstationary shocks A suggestion is that you only consider nonstationarity for productivity There is often ambivalence in the tests for stationarity of the shocks and in this case the deciding factor can be the Wald test for the overall model including the assumed status of the shocks After that we modify the error process in fname mod file and update the AR coefficients And then we run dynare fname mod again to get A and B matrix and bootstrapped the data from equation 3 You could add any trend terms found in the errors to the simulated data manually But in the Wald test we are normally only interested in the dynamic properties of the data and not in the trend terms So it is not necessary to add trend terms to the simulated data The bootstrapped data from equation 3 maintains the dynamic properties of the model Trend terms can be included in the VAR estimated on the data then the trend coefficients are ignored in the Wald The choice of auxilia
7. e nst_inx index of nonstationary shocks if there are Exact method residual inno rho_est GetRes_Exact fname act_data Step 2 Derive the simulated data by bootstrapping boots_data Boots_data fname act_data inno nboot A B stv type Input e nboot number of bootstraps e A 00_ dr ghx e B 00_ dr ghx e inno model innovation e type Type 1 residual bootstrap type 2 parametric simulation Output e boots data simulated data k T nboot matrix Step 3 Compute the Wald statistic pvalue Wald Trans_Wald Wald act_data var_no Boots_data var_no var_order var_variance Input e var_no 1 2 3 Choice of variables in the Wald calculation e var_order 1 Order of Var in the Wald caculation e var_variance 1 var_variance 1 including the volatility of shocks Output e Wald Wald statistics e Trans_Wald Transformed Wald Step3 Nonstatioanry case Wald Trans Mdis norm Wald_nonstationary act_data var_no boots data var_no act_nonstatRes id boots_nonstatResid rho nonstat var order var_ variance Input e var_no 1 2 3 Choice of variables in the Wald calculation e var_order 1 Order of Var in the Wald caculation e var_variance 1 var_variance 1 including the volatility of shocks e act_nonstatResid Xx for actual data e boots_nonstatResid X for bootstrap data e rho_nonstat rhos Output e Wald Wald statistics e Trans_Mdis_norm Transforme
8. e we use a VAR 1 You can use all the variables in the VAR or a subset of variables to see what combinations of parameters the model can fit For the model to fit the data at the 95 confidence level we want the Wald statistic for the actual data to be less than the 95th percentile of the Wald statistics from the simulated data The Wald statistics from the simulated data come from a Vv distribution with degrees of freedom equal to k 1 where k is the number of parameters in 2 To make it easier to understand whether the model has not been rejected by the data we transform the Wald for the actual data into a t statistic using the formula and scale it so that if the Wald was equal to the 95th percentile from the simulated data we would get a Transformed Wald of 1 645 V2w V2k 1 T 1 648 4 Sy V2k 1 where w is the Wald statistic on the actual data and w is the Wald statistic for the 95th percentile of the simulated data This procedure is implemented by wald_stationary function pvalue Wald Trans_Wald Wald stationary act_data var_no boots_ data var_no var_order var_var iance Remark HIW test when shocks are non stationary After we get model residuals Z we would like to know if the shocks are stationary The ADF test is used Empirical work on the SW model finds that most of the variables are stationary except the productivity shock Meenagh et al 2012 For nonstatioanry shocks we consi
9. efficients from simulated and actual data If the DSGE model is correct then it should produce simulated data that is similar to the actual data and therefore the VAR estimates on the simulated data will not be significantly different from the VAR estimates on the actual data From the actual data we get the VAR parameters p and from the simulations we get N sets of VAR parameters B for i 1 N from which we perform the relevant calculations The Wald statistic that we calculate is W B B 2 B B 1 where E B LY B ana Q c0v P E F BNB BY In essence we are measuring the distance the actual VAR parameters are from the average of the simulated VAR parameters 2 1 Implementation of the Wald test by bootstrapping Suppose the DSGE model is ALE Ym AY 2 2 z Dz EE i xuy16 cf ac uk Cardiff Business School Cardiff University Aberconway Building Colum Drive Cardiff CF10 3EU UK The DSGE model is solved by Dynare Juillard 2001 The solved reduced form is x Ax BE 3 where x 4 254 a are the auxiliary variables The coefficients and B are derived from 2 The following steps summarise how to implement the Wald test by bootstrapping Step 1 Calculate the residuals and innovations of the economic model conditional on the data and parameters Step 2 Derive the simulated data by bootstrapping Step 3 Compute the Wald statistic Step 1 Calculating the model resid
10. ents and model innovation Note that you may want specify your own error process e g ARMA re estimate it and get the model innovation To do so you need to amend this function manually This procedure is implemented by GetRes_ LIML function residual inno rho_est GetRes LIML fname act_data inx expect inx eqs Please note that LIML estimates of AR coefficients are sometimes very biased A better way is to start from LIML estimates of the AR coefficients get a new set of AR coefficients from exact method repeat until convergence After re estimation you need to update the error process in dynare and run dynare fname mod to get A and B matrices 4 Examples Two examples Smets Wonters 2007 NK model and NK 3 equation model used by Le et al 2011 Liu and Minford 2014 Smets Wonters model sw_st mod NK 3 equation NK model NK3eq_st mod Step1 Calculate the model residuals and innovations dynare sw_st mod LIML method residual inno rho_est nst_inx GetRes_LIML fname act_data inx_expect inx_eqs Input e fname fname M_ fname e act data k T matrix e ind_lead 1 7 13 14 The variables you used to generate E_t y_ t 1 by LIML e ind_eq 5 213101314 Select Equations that contains model residuals Output e Residual is the structure residuals k T matrix e Innovation model innovations exogenous variables k T matrix e rho_hat estimated AR coefficients for structure residuals
11. ry equation follows Davidson et al 2010 and Meenagh et al 2012 To use these methods on non stationary data we need to reduce them to stationarity This we do by assuming that the variables are cointegrated with a set of exogenous non stationary variables so that the residuals are stationary We then difference the data and write the relationships as a Vector Error Correction Mechanism as we now explain We suppose that in the class of structural models in which we are interested as potential candidates for the true model the endogenous variable vector y can be written in linearised form as a function of lagged y a vector of exogenous variables x Z and of errors Y f Va XZ amp 6 Now we assume that x are non stationary I 1 variables with drift trends which may be zero that z are 0 with deterministic trends that may be zero and that are exogenous variables defined as before Thus there are cointegrating relationships in the model that define the trend values of y as linear functions of the trends in these exogenous variables or Ay Bx CZ where for example if Ax pAx d then xX x NE dt we note also that z c et b L E Hence 1 Y A Bx Cz ft We now define the VECM as Ay Ce DE Ev F V 7 We can rewrite this as a VAR in the levels of y augmented by the arguments of y Y Q I Ya E 7 1 T y 14 Bx_ C ct et ftln 8 Fy_ Gx _ h
12. s by indirect inference a survey for users Forthcoming Open Economic Review 5 Liu C and Minford P 2014 How important is the credit channel An empirical study of the US banking crisis Journal of Banking and Finance Volume 41 April Pages 119 134 6 McCallum B T 1976 Rational expectations and the natural rate hypothesis some consistent estimates Econometrica 44 43 52 7 Meenagh D Minford P and Wickens M R 2012 Testing macroeconomic models by indirect inference on unfiltered data Cardiff Working Paper No E2012 17 Cardiff University Cardiff Business School Economics Section also CEPR discussion paper no 9058 CEPR London 8 Smets F Wouters R 2007 Shocks and Frictions in US Business Cycles A Bayesian DSGE Approach American Economic Review 97 586 606 9 Wickens M R 1982 The effcient estimation of econometric models with rational expectations Review of Economic Studies 49 55 67
13. section Step 2 Simulating the data Once we have the model innovations we can simulate the data by bootstrapping these innovations We bootstrap by time vector to preserve any simultaneity between them and solve the resulting model using Dynare More specifically the bootstrapped data x is obtained from equation 3 To obtain the N bootstrapped simulations that we need we repeat this process drawing each sample independently This procedure is implemented the Boots data function Another type of bootstrap is the parametric bootstrap That is to say if we know the error distribution i e variance we can also bootstrap the data from Monte Carlo simulation There is an option type that you can choose to use parametric or residual bootstrap type 2 stype 1 boostrap from unknown shocks Stype 2 boostrap from known shocks MC simulation 7 In dynare A oo_ dr ghx B oo_ dr ghu boots data Boots data fname act_ data inno nboot A B stv type Step 3 Compute the Wald statistic We estimate the auxiliary model a VAR 1 using both the actual data and the N samples of simulated data We then calculate the Wald statistic using equation 1 The bootstrap distribution of the Wald statistic can be found by substituting each B for p in Equation 1 The choice of variables and the order of the VAR is up to you The Wald test is a strict test so increasing the order of the VAR makes the test more stringent hence in practic
14. t n cons where 77 A Ce De Ev It should be noted that cons includes dummy constants for outliers in the errors we interpret these as effects of one off events such as strikes This is our auxiliary equation in the indirect inference testing procedure We estimate it both on the data and on the data simulated from the model bootstraps It allows us to test whether the model can capture the relationships in the data we focus on the matrices F in practice This IIW test procedure is implemented by the following function 1A necessary condition for the stationarity of the VECM arguments is that y is cointegrated with the elements of y both in the data and in the bootstrap simulations we check for this and report if it is not satisfied as this would invalidate the tests pvalue Wald Trans Wald Wald_nonstationary act_data var_no boots data var_no act_nonstatRes id boots nonstatResid rho nonstat var order var variance 3 Details of how to get model residuals and innovations To get model errors there are two ways the exact and the LIML method 3 1 Exact method when shock AR coefficients are known In the exact method we know the structure of shock process Suppose we know it follows an AR X process and know the AR coefficients We can obtain the model errors from the observed data and model parameters exactly For example suppose the DSGE model is ALE Yiu AY 2 9 z DZ E
15. uals z and innovations The number of independent structural residuals is taken to be less than or equal to the number of endogenous variables Using the data and the parameters we can calculate the structural errors If the equation does not have any expectations then the residuals are simply backed out from the equation and the data If the equation has expectations in it we need to estimate the expected values To do this we use the robust instrumental variables methods of McCallum 1976 and Wickens 1982 with the lagged endogenous data as instruments In practice we estimate a VAR of all the expected variables and use this to calculate the expectations In some DSGE models many of the structural residuals are assumed to be generated by autoregressive processes If they are then we need to estimate them After re estimation of AR coefficients we can calculate model innovations We call this method LIML This procedure is implemented by the Get_Res_LIML function residual inno rho_ est GetRes Exact fname act_ data Or if we obtained the AR coefficients from calibration or estimation as e g in SW 2007 model we can get the model innovations directly from the solved reduced form We call this method the exact method This procedure is implemented by Get Res Exact function residual inno rho_est GetRes LIML fname act_data inx expect inx eqs The details of two methods are explained in the next

Download Pdf Manuals

image

Related Search

Related Contents

PRO3 User manual  取扱説明書  Manuel d`entretien  【ポケットビデオカメラ SAL発表についてのご案内】  secdet® Handbuch CT-24  Cisco Systems PAP2 Troubleshooting  Star Micronics lC-10 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file