impactspsur {spsur}R Documentation

Direct, indirect and total effects estimated for a spatial SUR model

Description

This function is a wrapper for impacts method used in spatialreg package. Nevertheless, in this case the same method is used for both lagsarlm and lmSLX objects. For details of implementation, see the documentation of impacts function in spatialreg package.
The function obtains the multiplier effects, on the explained variable, of a change in a regressor for the model that has been estimated. For reasons given below, this function only applies to models with an autoregressive structure ("slm", "sdm", "sarar" and "gnm") or with spatial lags of the regressors ("slx", "sdem").
The measurement of the multiplier effects is a bit more complicated than in a pure time series context because, due to the spatial structure of the model, part of the impacts spills over non uniformly over the space. Using the notation introduced by LeSage and Pace (2009) we distinguish between:

The information on the three estimated effects is supplement with an indirect measure of statistical significance obtained from the randomization approach introduced in LeSage and Pace (2009).

Usage

impactspsur (obj, ..., tr = NULL, R = NULL, listw = NULL, 
                      evalues = NULL,tol = 1e-06, 
                      empirical = FALSE, Q = NULL)

Arguments

obj

An spsur object created by spsurml, spsur3sls or spsurtime.

...

Arguments passed through to methods in the coda package

tr

A vector of traces of powers of the spatial weights matrix created using trW, for approximate impact measures; if not given, listw must be given for exact measures (for small to moderate spatial weights matrices); the traces must be for the same spatial weights as were used in fitting the spatial regression, and must be row-standardised

R

If given, simulations are used to compute distributions for the impact measures, returned as mcmc objects; the objects are used for convenience but are not output by an MCMC process

listw

If tr is not given, a spatial weights object as created by nb2listw; they must be the same spatial weights as were used in fitting the spatial regression, but do not have to be row-standardised

evalues

vector of eigenvalues of spatial weights matrix for impacts calculations

tol

Argument passed to mvrnorm: tolerance (relative to largest variance) for numerical lack of positive-definiteness in the coefficient covariance matrix

empirical

Argument passed to mvrnorm (default FALSE): if true, the coefficients and their covariance matrix specify the empirical not population mean and covariance matrix

Q

default NULL, else an integer number of cumulative power series impacts to calculate if tr is given

Details

LeSage and Pace (2009) adapt the classical notion of 'economic multiplier' to the problem of measuring the impact that a unitary change in the value of a regressor, produced in a certain point in space, has on the explained variable. The question is interesting because, due to the spatial structure of the model, the impacts of such change spill non uniformly over the space. In fact, the reaction of the explained variable depends on its relative location in relation to the point of intervention.
To simplify matters, LeSage and Pace (2009) propose to obtain aggregated multipliers for each regressor, just averaging the N^{2} impacts that results from intervening the value of each regressor on each of the N points in Space, on the explained variable, measured also in each of the N points in space. This aggregated average is the so-called Total effect.
Part of this impact will be absorved by the explained variable located in the same point of the regressor whose value has been changed (for example, the k-th regresor in the g-th equation, in the n-th spatial unit) or, in other words, we expect that [d y_{tgn}]/[d x_{ktgn}] ne 0. The aggregated average for the N points in space (n=1,2,...,N) and Tm time periods is the so-called Direct effect. The difference between the Total effect and the Direct effect measures the portion of the impact on the explained variable that leakes to other points in space, [d y_{tgn}]/[d x_{ktgm}] for n ne m; this is the Indirect effect.

impacts obtains the three multipliers together with an indirect measure of statistical significance, according to the randomization approach described in Lesage and Pace (2009). Briefly, they suggest to obtain a sequence of nsim random matrices of order (NTmxG) from a multivariate normal distribution N(0; Sigma), being Sigma the estimated covariance matrix of the G equations in the SUR model. These random matrices, combined with the observed values of the regressors and the estimated values of the parameters of the corresponding spatial SUR model, are used to obtain simulated values of the explained variables. Then, for each one of the nsim experiments, the SUR model is estimated, and the effects are evaluated. The function impacts obtains the standard deviations of the nsim estimated effects in the randomization procedure, which are used to test the significance of the estimated effects for the original data.

Finally, let us note that this is a SUR model where the G equations are connected only through the error terms. This means that if we intervene a regressor in equation g, in any point is space, only the explained variable of the same equation g should react. The impacts do not spill over equations. Moreover, the impact of a regressor, intervened in the spatial unit n, will cross the borders of this spatial unit only if in the right hand side of the equation there are spatial lags of the explained variables or of the regressors. In other words, the Indirect effect is zero for the "sim" and "sem" models. impacts produces no output for these two models. Lastly, it is clear that all the impacts are contemporaneous because the equations in the SUR model have no time dynamics.

Value

A list of G objects either of class lagImpact or WXImpact.

For each of the G objects of the list, if no simulation is carried out the object returned is a list with:

direct numeric vector
indirect numeric vector
total numeric vector

and a matching Qres list attribute if Q was given.

On the other hand, for each of the G objects of the list, if simulation is carried out the object returned is a list with:

res a list with three components as for the non-simulation case, with a matching Qres list attribute if Q was given.
sres a list with three mcmc matrices, for the direct, indirect and total impacts with a matching Qmcmclist attribute if Q was given.

Author(s)

Fernando Lopez fernando.lopez@upct.es
Roman Minguez roman.minguez@uclm.es
Jesus Mur jmur@unizar.es

References

See Also

impacts, spsurml, spsur3sls

Examples


## VIP: The output of the whole set of the examples can be examined 
## by executing demo(demo_impactspsur, package="spsur")


###############################################
### PURE CROSS SECTIONAL DATA(G>1; Tm=1) ######
###############################################

#### Example 1: Spatial Phillips-Curve. Anselin (1988, p. 203)
 rm(list = ls()) # Clean memory
 data(spc)
 lwspc <- spdep::mat2listw(Wspc, style = "W")
 Tformula <- WAGE83 | WAGE81 ~ UN83 + NMR83 + SMSA | UN80 + NMR80 + SMSA
## For SLM, SDM and SARAR models the output is a list of "lagImpact" objects
## See spatialreg::impacts for details.
 spcsur_slm <-spsurml(formula = Tformula, data = spc, 
                      type = "slm", listw = lwspc)
 summary(spcsur_slm)
 impacts_slm <- impactspsur(spcsur_slm, listw = lwspc, R = 1000)
## Impacts equation 1
 summary(impacts_slm[[1]], zstats = TRUE, short = TRUE)
## Impacts equation 2
 summary(impacts_slm[[2]], zstats = TRUE, short = TRUE)
## For SLX and SDEM models the output is a list of "WXImpact" objects
## See spatialreg::impacts for details.
## A SUR-SLX model
 spcsur_slx <-spsurml(formula = Tformula, data = spc, 
                      type = "slx", listw = lwspc)
 summary(spcsur_slx)
 impacts_slx <- impactspsur(spcsur_slx, listw = lwspc)
 summary(impacts_slx[[1]], zstats = TRUE, short = TRUE)
 summary(impacts_slx[[2]], zstats = TRUE, short = TRUE)

## A SUR-SDM model
 spcsur_sdm <-spsurml(formula = Tformula, data = spc, 
                      type = "sdm", listw = lwspc)
 impacts_sdm <- impactspsur(spcsur_sdm, listw = lwspc, R = 1000)
 summary(impacts_sdm[[1]], zstats = TRUE, short = TRUE)
 summary(impacts_sdm[[2]], zstats = TRUE, short = TRUE)
## A SUR-SDM model with different spatial lags in each equation
 TformulaD <- ~ UN83 + NMR83 + SMSA | UN80
 spcsur_sdm2 <-spsurml(formula = Tformula, data = spc, type = "sdm", 
                       listw = lwspc, Durbin = TformulaD)
 summary(spcsur_sdm2)                       
 impacts_sdm2 <- impactspsur(spcsur_sdm2, listw = lwspc, R = 1000)
 summary(impacts_sdm2[[1]], zstats = TRUE, short = TRUE)
 summary(impacts_sdm2[[2]], zstats = TRUE, short = TRUE)
 ## A SUR-SLX model with different spatial lags in each equation
 spcsur_slx2 <-spsurml(formula = Tformula, data = spc, 
                      type = "slx", listw = lwspc, Durbin = TformulaD)
 summary(spcsur_slx2)
 impacts_slx2 <- impactspsur(spcsur_slx2, listw = lwspc)
 summary(impacts_slx2[[1]], zstats = TRUE, short = TRUE)
 summary(impacts_slx2[[2]], zstats = TRUE, short = TRUE)
 
# ####################################
# ######## G=1; Tm>1               ###
# ####################################
#
 rm(list = ls()) # Clean memory
 data(NCOVR, package="spsur")
 nbncovr <- spdep::poly2nb(NCOVR.sf, queen = TRUE)
### Some regions with no links...
 lwncovr <- spdep::nb2listw(nbncovr, style = "W", zero.policy = TRUE)
 Tformula <- HR80  | HR90 ~ PS80 + UE80 | PS90 + UE90
### A SUR-SLM model
 NCOVRSUR_slm <-spsurml(formula = Tformula, data = NCOVR.sf, 
                        type = "slm", listw = lwncovr, 
                        method = "Matrix", zero.policy = TRUE, 
                        control = list(fdHess = TRUE))
 summary(NCOVRSUR_slm)
### Use of trW to compute.
 Wncovr <- Matrix::Matrix(spdep::listw2mat(lwncovr))
 trwncovr <- spatialreg::trW(Wncovr, type = "MC")
 impacts_NCOVRSUR_slm <- impactspsur(NCOVRSUR_slm, tr = trwncovr,
                                 R = 1000)
 summary(impacts_NCOVRSUR_slm[[1]], zstats = TRUE, short = TRUE)
 summary(impacts_NCOVRSUR_slm[[2]], zstats = TRUE, short = TRUE)



[Package spsur version 1.0.2.5 Index]