Thanks to Prof. Kit Baum, varlmhet and veclmhet are now available on SSC. You can install them from SSC by entering the following command into Stata:
With STATA, users can estimate VAR and VEC models using the var and vec commands, respectively.
In particular, since STATA 19, the var command has had the vce(robust) option added to help adjust standard errors in the presence of heterogeneity. However, there is currently no command to test for the presence of heterogeneity after estimating var and vec, and thus, users may be confused in deciding whether to use the vce(robust) option. In response to that request, I wrote two STATA commands called varlmhet and veclmhet that allow performing LM tests for heterogeneity of VAR and VEC models. The test performed is an extended version of White’s (1980) test for multi-equation models (See Doornik (1980) for more details).
For any comments about the command, please send to [email protected]
Here are some examples:
Code:
ssc install varlmhet
In particular, since STATA 19, the var command has had the vce(robust) option added to help adjust standard errors in the presence of heterogeneity. However, there is currently no command to test for the presence of heterogeneity after estimating var and vec, and thus, users may be confused in deciding whether to use the vce(robust) option. In response to that request, I wrote two STATA commands called varlmhet and veclmhet that allow performing LM tests for heterogeneity of VAR and VEC models. The test performed is an extended version of White’s (1980) test for multi-equation models (See Doornik (1980) for more details).
For any comments about the command, please send to [email protected]
Here are some examples:
Code:
. webuse lutkepohl2, clear (Quarterly SA West German macro data, Bil DM, from Lutkepohl 1993 Table E.1) . tsset Time variable: qtr, 1960q1 to 1982q4 Delta: 1 quarter . gen t=_n . . * VAR model . qui var dln_inv dln_inc dln_consump, lags(1/2) exog(t) . varlmhet VAR Residual Heteroscedasticity Tests (Includes Cross Terms) H0: Homoscedasticity Chi2(210) = 226.8771 Prob > chi2 = 0.2019 . varlmhet, nocross VAR Residual Heteroscedasticity Tests (Excludes Cross Terms) H0: Homoscedasticity Chi2( 84) = 81.2221 Prob > chi2 = 0.5656 . . * VEC model . qui vec ln_inv ln_inc ln_consump, lags(2) . veclmhet VEC Residual Heteroscedasticity Tests (Includes Cross Terms) H0: Homoscedasticity Chi2( 84) = 82.1650 Prob > chi2 = 0.5363 . veclmhet, nocross VEC Residual Heteroscedasticity Tests (Excludes Cross Terms) H0: Homoscedasticity Chi2( 48) = 52.1179 Prob > chi2 = 0.3169