*! version 1.4.2 06feb2024

*! Sebastian Kripfganz, www.kripfganz.de

*! Vasilis Sarafidis, sites.google.com/view/vsarafidis

Title

spxtivdfreg postestimation -- Postestimation tools for spxtivdfreg

Postestimation commands

The following postestimation commands are of special interest after spxtivdfreg:

Command Description

estat impact direct, indirect, and total impacts

estat overid perform test of overidentifying restrictions

The following standard postestimation commands are available:

Command Description

estat VCE and estimation sample summary

predict predictions and residuals

Syntax for predict

predict [type] newvar [if] [in] [, statistic]

statistic

Main
rform reduced-form prediction; the default

direct prediction of the direct mean

indirect prediction of the indirect mean

naive naive-form prediction

xb linear prediction

residuals residuals

Description for predict

predict creates a new variable containing predictions such as fitted values and residuals.

Options for predict

Main

rform calculates the reduced-form prediction, which is the predicted mean of the dependent variable conditional on the independent variables and any spatial lags of the independend variables. This is the default.

direct calculates the prediction of the direct mean, which is a group's predicted contribution to its reduced-form mean.

indirect calculates the prediction of the indirect mean, which is the predicted contribution of all other groups to the reduced-form mean, i.e. the predicted contribution to the direct mean subtracted from the reduced-form prediction.

naive calculates the naive-form prediction, which is the linear prediction from the fitted model.

xb calculates the linear prediction from the fitted model, ignoring the spatial lag of the dependent variable.

residuals calculates the residuals, i.e. the naive-form prediction subtracted from depvar.

Syntax for estat

Direct, indirect, and total impacts

estat impact [varlist] [, sr|lr constant post force display_options]

Hansen tests of overidentifying restrictions

estat overid

Description for estat

estat impact estimates the mean of the direct, indirect, and total impacts of the independent variables in varlist on the reduced-form mean of the dependent variable.
By default, the impacts of all independent variables in the fitted model are computed.

estat overid reports the Hansen (1982) J-statistic which is used to determine the validity of the overidentifying restrictions.

Options for estat

constant with estat impact requests to also compute the impacts for the constant term. By default, this is suppressed.

sr with estat impact requests to compute the short-run impacts. This is the default.

lr with estat impact requests to compute the long-run impacts instead of the short-run impacts.

post with estat impact replaces the coefficient vector e(b) in the saved estimation results by the vector of direct, indirect, and total impacts, and accordingly for the variance-covariance matrix e(V).
This allows the subsequent use of other postestimation commands, such as the calculation of linear combinations of impacts or tests for linear hypotheses; see [R] lincom and [R] test, respectively.
The original estimation results can only be recovered by refitting the original model with spxtivdfreg, or by storing the estimation results before calling estat impact and then restoring them;
see [R] estimates store.

force with estat impact ignores a potential violation of the model's stability conditions and forces the computation of the impacts.
By default, if the estimated spatial lag coefficient is larger than the inverse maximum eigenvalue of the spatial weights matrix, estat impact stops with an error message.
For long-run impacts, an additional stability condition is that the sum of time lags, spatial lag, and spatial time lags coefficients must not exceed the inverse maximum eigenvalue of the spatial weights matrix.

display_options: level(#) and other display_options; see xtivdfreg.

Remarks for estat

The standard errors for the direct, indirect, and total impacts are computed with the Delta method.

In order to correctly compute long-run impacts, time lags and spatial time lags of depvar must be specified with options tlags(#) and sptlags(#) of spxtivdfreg, respectively.
They must not be specified directly in the indepvars or spindevars(varlist) lists.

If the regression model contains distributed lags of indepvars or spatially lagged indepvars, estat impact does not automatically add up their effects when computing long-run impacts.
This needs to be done manually by calling estat impact with option post and subsequently running the lincom command.

The overidentification test statistic is constructed as a quadratic form of the moment functions with an asymptotically optimal weighting matrix. The latter is based on the first-stage residuals.
The test is not valid and therefore not reported for a model with heterogeneous slopes that is estimated with the mean-group estimator.

Example

Setup (requires Stata version 15 or higher)

(The data set and spatial weights matrix are available as ancillary files for the xtivdfreg package.)

. use http://www.kripfganz.de/stata/spxtivdfreg_example

. copy http://www.kripfganz.de/stata/spxtivdfreg_example_spmat.stswm .

. spmatrix use W using spxtivdfreg_example_spmat

Defactored IV estimation with spatial lag and time lag, homogeneous slopes

. spxtivdfreg NPL INEFF CAR SIZE BUFFER PROFIT QUALITY LIQUIDITY, absorb(ID) splag tlags(1) spmatrix(W) iv(INTEREST CAR SIZE BUFFER PROFIT QUALITY LIQUIDITY, splags lag(1)) std

Short-run and long-run impacts

. estat impact, sr

. estat impact, lr

Saved results

estat impact saves the following in r():

Matrices

r(b) vector of impacts

r(V) variance-covariance matrix of the impacts

estat overid saves the following in r():

Scalars

r(chi2) Hansen's J-statistic

r(df) degrees of freedom of Hansen's J-test

r(p) p-value of Hansen's J-test

Author

Sebastian Kripfganz, University of Exeter, http://www.kripfganz.de

Vasilis Sarafidis, Brunel University London, https://sites.google.com/view/vsarafidis

References

Hansen, L. P. 1982.
Large sample properties of generalized method of moments estimators.
Econometrica 50: 1029-1054.