___ ____ ____ ____ ____(R) /__ / ____/ / ____/ ___/ / /___/ / /___/ Statistics/Data Analysis Title svarih bfanelli -- Heteroskedasticity-identified SVAR models, Bacchiocchi/Fanelli (2012) methodology Syntax svarih bfanelli depvarlist [if] [in] , rgmvar(rgmvarname) [optional_options] options description ------------------------------------------------------------------------- Model: IH part rgmvar(rgmvarname) identify regimes by contents of variable rgmvarname bconstraints(constraints_b) apply previously defined constraints_b to B beq(matrix_beq) define and apply to B equality constraint matrix matrix_beq bcns(matrix_bcns) define and apply to B cross-parameter constraint matrix matrix_bcns e#constraints(constraints_e#) apply previously defined constraints_e# to E#, for 2 < # < 4 e#eq(matrix_e#eq) define and apply to E# equality constraint matrix matrix_e#eq, for 2 < # < 4 e#cns(matrix_e#cns) define and apply to E# cross-parameter constraint matrix matrix_e#cns, for 2 < # < 4 noidencheck do not check for local identification Model: VAR part lags(numlist) use lags numlist in the underlying VAR exog(varlist_exog) use exogenous variables varlist_exog noconstant suppress constant term dfk make small-sample degrees-of-freedom adjustment small report small-sample t and F statistics Reporting and screen output level(#) set confidence level var display underlying var output nocnsreport do not display constraints notable do not display estimation results table display_options control column formats Maximization evalmode(modenum) choose between d0, d1, and d2 evaluators; rarely used maximize_options control the maximization process coeflegend display legend instead of statistics ------------------------------------------------------------------------- You must tsset your data before using svarih bfanelli; see [TS] tsset. varlist_exog may contain time-series operators; see tsvarlist. depvarlist may NOT contain time-series operators. See svarih postestimation for features available after estimation. Description svarih bfanelli provides an alternative identification scheme for structural VARs than those implemented in svar. It implements a variant of the the "Identification through Heteroskedasticity" (IH) method as put forth in Bacchiocchi/Fanelli (2012). Differently than svarih bacchiocchi and svarih llutkepohl, it does not assume stability of the VAR parameters across volatility regimes. For details of the model setup, see the Remarks section. For general information on IH methods and for other IH methods that are available, see svarih. Abbreviations, definitions, notation This help entry uses abbreviations and definitions from svarih. Options +----------------+ ----+ Model: IH part +--------------------------------------------------- rgmvar(rgmvarname) determines the variable whose observations identify the volatility regimes. It must be a numeric variable holding non-negative integer values between 1 and 4 where each integer value identifies a particular volatility regime. Differently than svarih bacchiocchi, the regime encoding for svarih bfanelli is hardcoded in the following way: The baseline state (shock impact matrix B) is encoded by rgmvar==1. Its constraints are defined by options bconstraints(), beq(), and bcns(). There must be at least another volatility regime in the sample, represented by the paramter matrix E2. Its constraints are defined by options e2constraints(), e2eq(), and e2cns(). This state is encoded by rgmvar==2. There can be up to two additional volatility regimes in the model, represented by the paramter matrices E3 and E4. The constraint specification and the regime encoding is done in an analogous fashion to the second volatility state and uses integers 3 and 4. In any model specification, the volatility encodings that occur in the sample must be contiguous. For example, you cannot estimate a model whose rgmvar has values 1, 2, and 4 in the estimation sample. If you want to run this specification, you need to recode rgmvar or generate a different rgmvar that carries encodings 1, 2, and 3. Such a situation can occur if you restrict the estimation sample through the [if] [in] conditions. Assume that you have data for 1970m1-1999m12 and variable year holds the year of observations. You define regimes such that rgmvar==1,2,3 for observations in the 70s, 80s, 90s, respectively. After defining sufficient constraints you can estimate the model for the entire sample and pass the local identification check. However, if you want to exclude the 80s from the sample by typing . svarih bfa (...) if !inrange(year,1980,1989) (...) you will receive an error, since rgmvar only holds values 1 and 3 in the restricted estimation sample, which are not contiguous. The solution is to generate a different rgmvar with state 3 recoded to 2, and using e2 constraint options rather than e3 constraint options. Despite these limitations, the following still holds true: It is not a requirement that a particular regime has contiguous observations in time. There can be data gaps within a regime and between regimes. The sequence of regimes and the number of occurrences of one particular regime is unrestricted. For example, a regime sequence 2, 4, ., 4, 1, ., 3 can be accommodated by svarih bfanelli (a dot indicates missing values for rgmvar or data gaps). bconstraints(constraints_b), beq(matrix_beq), bcns(matrix_bcns) have the same meaning and can be specified in a similar manner as bconstraints, beq, bcns in svar. See the exposition there. They define linear constraints on the baseline state shock impact matrix B. A difference to svar is that bconstraints() does accept restrictions across model matrices B, E2, E3 and E4. beq(matrix_beq) defines equality constraints. matrix_beq usually is an existing matrix but it may also be an expression as in matrix input or a simple matrix function. For example, beq((.,0\.,.)) and beq(I(2)) are allowed bcns(matrix_bcns) defines cross-equation constraints. Argument matrix_bcns can be supplied in the same way as matrix_beq from option beq(). bconstraints(constraints_b) can define either one. They are defined using the constraint command. e#constraints(constraints_e#), e#eq(matrix_e#eq), e#cns(matrix_e#cns), where # must be an integer in the range 2 < # < 4, work in the same way as bconstraints, beq and bcns. The define linear constraints on the shock impact modification matrices E2, E3, and E4. noidencheck skips the check for local identification of parameters. The check consists of examining the rank of a matrix at the parameter estimates. Full rank of this matrix is needed for identification. For details, see the associated PDF document to svarih or the working paper by Bacchiocchi/Fanelli (2012). +-----------------+ ----+ Model: VAR part +-------------------------------------------------- lags(numlist) see var / svar. exog(varlist_exog) see var / svar. noconstant; see [R] estimation options. dfk see var / svar. small see var / svar. +-----------------------------+ ----+ Reporting and screen output +-------------------------------------- level(#); see [R] estimation options. var specifies that the output from var also be displayed. Note that there are multiple VARs underlying svarih bfanelli. By default, these VARs are fit quietly. This option is not available when you replay estimates. nocnsreport; see [R] estimation options. notable does not display the estimation output table. display_options: cformat(%fmt), pformat(%fmt), and sformat(%fmt); see [R] estimation options. +--------------+ ----+ Maximization +----------------------------------------------------- evalmode(modenum) will choose between d0, d1, and d2 evaluators. Rarely used. The default is 2. Can be used to check the numerical robustness of large models. maximize_options: difficult, technique(algorithm_spec), iterate(#), [no]log, trace, gradient, showstep, hessian, showtolerance, tolerance(#), ltolerance(#), nrtolerance(#), nonrtolerance(#), and from(init_specs); see [R] maximize. coeflegend; see [R] estimation options. Remarks svarih bfanelli implements the IH-BFA method within a maximum likelihood framework as an extended SVAR B-model. The extension consists of positing a priori knowledge about different regimes of volatility, i.e. time periods during which the structural shocks have different variances and possibly nonzero covariances. Consequently, a prerequisite for estimation is the specification of a variable that identifies these regimes, which in the following is referred to as the "regime variable". The distinguishing feature of IH-BFA within the class of SVAR-IH methods is that it does not assume constancy of the VAR model parameters across regimes. In terms of a typical structural VAR equation that relates VAR residuals u_t to structural shocks e_t, the model in Baccchiocchi/Fanelli (2012) reads (1a) u_t = B*e_t , t is in regime 1 (1b) u_t = (B+E2)*e_t , t is in regime 2 (1c) u_t = (B+E3)*e_t , t is in regime 3 (1d) u_t = (B+E4)*e_t , t is in regime 4 As usual, B models the contemporaneous impact of shocks. E2, E3, and E4 model the volatility differentials between regimes 1 and 2, 3, 4. Note that even if all E# matrices in the model are constrained to null matrices, (1a)-(1d) do not collapse into a standard SVAR B-model implemented in svar since each regime has its own separate underlying VAR regressions. Examples The following example illustrates the mechanics of IH-BFA. It does not discuss the important issues of the interpretation of the shocks. It focuses on the mechanics. It leans on the example given in svar so you can compare the svarih bfa setup to the one of svar. Throughout this example section, we store estimated results in Stata's estimation results catalogue for later access. The utility svarih examples allows you to easily re-generate these estimates at any point. In order to apply IH-BFA, we first must define a regime variable. To that end, we make the following assumptions: We have prior knowledge that the volatilities of the shocks in our model have changed in the 1970s. In addition, we have evidence that slope coefficients of the underlying VAR also have changed at the same time. We fix a date of regime change for 1974q1. The statement below generates a variable that contains values 1 and 2, as required by a svarih bfa model with two regimes. . webuse lutkepohl2 . gen byte rgmvar = (qtr>=tq(1974q1)) + 1 It is worth reiterating that the occurence of regimes can be modeled to be much more complicated than this. Any sequence and any multiplicity of regimes, with any occurence of gaps in the data, are allowed. If there are enough observations, svarih bfa will produce estimates. Before estimation, we have to decide which constraints we impose. Let's start with a lower triangular shock impact matrix in both regimes. . matrix beq = (.,0,0 \ .,.,0 \ .,.,.) . matrix e2eq = beq . svarih bfa dln_inv dln_inc dln_consump , rgmvar(rgmvar) beq(beq) e2eq(e2eq) . est store bfa_svarrepl To illustrate the relation of IH-BFA to SVAR models, we run two subsample SVARs, one for each regime. . matrix aeq = I(3) . svar dln_inv dln_inc dln_consump if rgmvar==1, aeq(aeq) beq(beq) . est store bfa_svar1 . svar dln_inv dln_inc dln_consump if rgmvar==2, aeq(aeq) beq(beq) . est store bfa_svar2 The svarih bfa B-matrix estimates are identical to the svar B-matrix estimates for the regime 1 subsample. The sum of the svarih bfa B and E-matrix estimates corresponds to the svar B-matrix estimates for the regime 2 subsample. We compare the first subsample: . estimates table bfa_svarrepl bfa_svar1 , p stats(ll N) To confirm the second claim we take advantage of the replay functionality of svarih invoked by the option cmat. . estimates restore bfa_svarrepl . svarih, cmat bpluse(2) format(%12.4f) . estimates replay bfa_svar2 , nocnsreport So far, there is nothing gained in comparison to SVAR models. IH-BFA, However, can achieve identification schemes not possible in SVAR models. Below we relax the restriction on element B[1,2], but add some more restrictions to E2: The resulting scheme allows for a differential impact of the first shock on the first two endogenous variables in regime 2, and of the second shock on the second model variable. . matrix beq = (.,.,0 \ .,.,0 \ .,.,.) . matrix e2eq = (.,0,0 \ .,.,0 \ 0,0,0) . svarih bfa dln_inv dln_inc dln_consump , rgmvar(rgmvar) e2eq(e2eq) beq(beq) . est store bfa_unconstr . svarih , cmat b e2 bpluse(2) format(%12.3f) star In order to perform a LR-test to test whether the two differential impacts on the second endogenous variable can be excluded, we estimate a constrained model: . matrix e2eq = (.,0,0 \ 0,0,0 \ 0,0,0) . svarih bfa dln_inv dln_inc dln_consump , rgmvar(rgmvar) e2eq(e2eq) beq(beq) . est store bfa_constr . lrtest bfa_constr bfa_unconstr , stat The exclusion restrictions cannot be rejected at any conventional level. predict after svarih bfanelli generates prediced values, residuals, shocks, and historical decompositions. dsimih generates dynamic simulation statistics. For all features available after estimation, see svarih postestimation. Saved results svarih bfanelli saves the following in e(): Scalars e(N) number of observations e(N_cns) number of constraints e(k_eq) number of equations in e(b) e(k_dv) number of dependent variables e(k_aux) number of auxiliary parameters e(ll) log likelihood e(N_var#) number of observations for VAR # e(N_gaps_var#) number of gaps in the sample for underlying VAR # e(k_var) number of coefficients in each underlying VAR e(k_eq_var) number of equations in each underlying VAR e(k_dv_var) number of dependent variables in each underlying VAR e(df_eq_var) average number of parameters in an equation of each underlying VAR e(df_r_var#) if small, VAR residual degrees of freedom for VAR # e(mlag) highest lag in VAR e(tmin_var#) first time period in the sample for VAR # e(tmax_var) maximum time for VAR # e(rank) rank of e(V) e(ic_ml) number of ML iterations e(rc_ml) return code from ml e(converged_ml) 1 if ml declared convergence, 0 otherwise e(numregimes) number of regimes marked by regimevar Macros e(cmd) svarih e(method) BFanelli e(version) version number of command e(cmdline) command as typed e(lags) lags in model e(depvar) names of dependent variables e(rgmvar) name of variable that identifies regimes e(exog) names of exogenous variables, if specified e(nocons) noconstant, if noconstant specified e(cns_b) comprehensive list of constraints on B e(cns_e#) comprehensive list of constraints on E# e(dfk_var) alternate divisor (dfk), if specified e(small) small, if specified e(tsfmt) format of timevar e(timevar) name of timevar e(title) title in estimation output e(predict) program used to implement predict e(from) contents of maximization option from, if specified as a string e(mlopts) maximization options used e(idencheck) result of identification check; one of passed, failed, or skipped e(regimes) regime encodings that occur in sample e(regimes_Ns) number of observations in each regime Matrices e(b) coefficient vector e(Cns) constraints matrix e(Sigma_var#) Residual covariance matrix for underlying VAR # e(V) variance-covariance matrix of the estimators e(b_var#) coefficient vector for underlying VAR # e(V_var#) VCE for underlying VAR # e(beq) beq(matrix), if specified e(bcns) bcns(matrix), if specified e(e#eq) e#eq(matrix), if specified e(e#cns) e#cns(matrix), if specified e(B) estimated B matrix e(E#) estimated E# matrix e(from) matrix of maximization option from, if specified as a matrix Functions e(sample) marks estimation sample Author Daniel C. Schneider, Goethe University Frankfurt, dan_schneider@outlook.com Acknowledgements The code of official Stata's svar has served as a point of reference throughout the development of svarih bfanelli. Any remaining errors in svarih bfanelli are mine. References Bacchiocchi, E. and L. Fanelli (2012): Identification in Structural Vector Autoregressive Models with Structural Changes. Universita Degli Studi di Milano, Working Paper No.2012-16. Also see Help: [TS] svar, svarih, svarih bac, svarih llu, svarih postestimation, svarih cmat, dsimih