Summary statistics of crime variable.
Abstract
Advances in econometric modeling and analysis of spatial cross-sectional and spatial panel data assist in revealing the spatiotemporal characteristics behind socio-economic phenomena and improving prediction accuracy. Difference-in-differences (DID) is frequently used in causality inference and estimation of the treatment effect of the policy intervention in different time and space dimensions. Relying on flexible distributional hypotheses of treatment versus experiment groups on spillover, spatiotemporal DID provides space for innovation and alternatives, given the spatial heterogeneity, dependence, and proximity into consideration. This chapter gives a practical econometric evaluation of the dynamic mechanism in this spatiotemporal context as well as a toolkit for this fulfillment.
Keywords
- spatial difference-in-differences (SDID)
- causality inference
- spillover
- random effects
- fixed effects
- direct effects
1. Introduction
Spatial panel data are used to investigate the spatial reliance in different regions, and some of the spillover effects are between regions, and ordinary least squares cannot reveal.
Spatial difference-in-differences (SDID) is used to investigate policy effect on the socio-economic variable, given the temporal-lagged variable into consideration. Usually, OLS fails to estimate the model with unbiased that Moran’s I reveals. The function of segregation of direct, indirect, and total effects in terms of the specification of the fixed and random effect model makes the SDID’s advantage over the traditional DID model.
2. Assumptions of SDID
2.1 DID model assumptions
To study the fixed effect of individual and time respectively, difference-in-differences (DID) specify the time and location designs in an experiment setting by an estimator of the fixed effect of panel data in average treatment effect on the treated [1, 2]. However, the spatial spillover effect complicates the estimation process. In the experiment group and treatment group, the impact of the treatment is measured before and after the treatment is applied.
Spatial Policy Effect:
Individual fixed effect
Time-variant control
The ordinary least square (OLS) is a consistent estimator for the effect of the causality inference.
After the bias is removed,
So far, only the spillover between treatment and control groups is not treated.
The strict set of assumptions of the DID is there is no spillover in treatment, control, or between treatment and control groups. When an assumption of same spillover effect within the control and treatment groups is added to the strict set, the assumption becomes relaxed restriction set 1. When there is no spillover between treatment and control groups, the assumption of relaxed restriction set 1 is changed to the spillover effect on control and treatment groups are same and the assumption becomes relaxed restriction set 2.
The traditional DID
2.2 Spatial model assumptions
The spatial spillover has the properties of spatial heterogeneity, spatial dependence (the butterfly effect and spatial association), and spatial proximity. Spatial heterogeneity denotes the different structures of spatial units in different locations [3, 4, 5]. Without the assumption on spatial homogeneity parameters, it is hard to estimate the model with the increase of observations. In the spatial model, most of the estimation assumes locations are regional homogeneous. The definition of spatial heterogeneity is the non-smoothness of a spatial random process, which comprises change of function form or parameters and heteroscedasticity of two categories.
Spatial dependence means the adjacent spatial locations have the propensity to be associated with each other and work in coordination synchronously.
Spatial proximity denotes that in spatial areas everything is related to everything else, but near things are more related than distant things (Waldo Tobler).
3. Model specifications-generalized spatial model
The panel data regression is a linear regression with the combination of three types of spatially lagged variables across time, which traces the same observation unit over different times. The observation unit’s characteristic over time and spatial location are the research interest. The classical panel data regression takes the following form based on Arbia [6], Cerulli [2], LeSage and Pace [3], and Wooldridge [5]:
The generalized spatial model includes the following variations.
Spatial Autoregression Model (SAR-SDID)
Before the spatial regression, Moran’s I test is used to measure and test spatial autoregression in general. It is also called a global spatial autoregression test; that is, it measures the degree of similarity to each other between the spatial observations in the sample.
where n is the number of observations, and
The positive Moran’s I denotes a positive correlation, while a negative value means a negative correlation. The standardization of the spatial weight matrix simplifies the notation as follows.
It is obvious that Moran’s I is the Pearson correlation coefficient between X and WX. It follows an asymptotic distribution, which simplifies the process of using Moran’s I to test spatial autocorrelation in the residual of the test. It is a statistical inference through the z-test.
A partial Moran’s test is
Partial Moran’s test
‘Columbus’ data are generated by geographical information systems (GIS) [7] based on US census data1 on Columbus boundary systems, with the data type “.shp.” The file stores feature geometry such as coordinates of polygon centroids and their boundary. The W matrix is derived from the contiguity-based neighbors’ list [6].
The summary statistics of the “crime” variable in the “Columbus” data, totally 49 observations, are as follows (Table 1):
Minimum | 1st quantile | Median | Mean | 3rd quantile | Maximum |
---|---|---|---|---|---|
0.1783 | 20.0485 | 34.0008 | 35.1288 | 48.5855 | 68.8920 |
The test of Moran’s I depends on the distribution of its input variable and is done
The assumption of the method is when the spatial units are randomly distributed, the variable is not autocorrelated, and Moran’s I is close to 0. When Moran’s I is with a low probability of occurrence, the null hypothesis of no autocorrelation is rejected. When the input variable is the residual of classical linear regression, assumed to follow a normal distribution, Moran’s I follows a normal distribution as well, where the z-test is applicable to avoid the heavy calculation of Monte Carlo simulation.
3.1 Spatial error model (SEM-SDID)
3.2 Spatial Durbin model (SDM-SDID)
3.3 Spatial lag of X model (SXL-SDID)
The spatial weight matrix
To account for the direct impact and indirect impact, the transformation of Eq. 13 is taken as follows.
In matrix format, let the constant vector
The sum of the rows of
where ADI denotes the average impact of change of local explanatory variable
ATITO is the average impact on the specific local dependent variable y from the change in the explanatory variable
ATIFO is the average impact on all regional dependent variable y from the change in the explanatory variable
ATITO and ATIFO are equal values and are called by a joint name ATI.
4. Tests on model assumptions
A robust test is performed to study whether the estimation is sensitive to the change in the width of the event window. Wald test follows an asymptotic chi-squared distribution with N degree of freedom.
The test on correlation coefficient
The estimation is done with spatial inverse-distance contiguity weight matrix.
A parallel test is used to test that the change of temporally dependent variable as control will or will not impact the direction of policy influence. A good control ensures the conditional independent assumption (CIA) holds. The different outcomes between the treatment group subject to intervention and the control group in the absence of intervention produce reliable results if both groups are similar in their characteristics and have parallel trends before the intervention, that is, the parallel trends assumption. If the assumption holds, the different outcomes between groups attributed to the intervention ([1, 8, 9, 10, 11]). It differs from the Granger test in that a parallel test is performed in the periods before policy intervention to reveal the significant parameters
Granger test is focused on the after-event periods, to investigate whether the parameters of DID after the policy intervention,
To be specific, Buerger et al. [12] use Granger equations to test the parallel trends assumption, the most important DID framework assumption to improve evidence on causal claims.
When relaxing the parallel assumption, the placebo test answers the question that does the policy matter if one period before or behind implementation? It is tested on the significance of
Hausman test is the test on the choice of fixed effect model or random effect model.
If Corr(
If Corr(
Under the normality assumption, the maximum-likelihood estimator
Hausman test compares the difference of two estimators to infer the existence of correlation
The Lagrangian multiplier is used to test the possible spatial autocorrelation in the residual of the model, which is like Moran’s I test on the potentially existing spatial autocorrelation. The difference lies in the individual effect as the spillover effect in the dependent variable lagged spatial model.
Under the setting of the individual and temporal dual fixed effect model in Eq.13, the two restrictive constraint tests on the coefficients are as follows.
If
If both hypotheses are rejected, Eq. 13 is selected.
If
If
If the two restrictive constraint tests yield a different result from that of RLM, Eq. 13 is selected.
5. Application: an example
In Gu [16] policy evaluation research, DID estimator is renewed as development in academic patent activities following a spatial autoregressive process with respect to the dependent variable. The DID is proposed as a spatial DID estimator to account for spatial spillover effects. The empirical analysis of 31 Chinese provinces indicates that an incentive patent policy plays a positive role in the output and commercialization of academic patents during the period from 2010 to 2019. Incentive patent policies are found to play as a placebo in academic patent activities.
The traditional DID method ignores the geographical proximity and spatial spillover effects of academic patent activities. Gu [16] shows the spatial DID model is used to find out three treatment effects, that is, treatment effects based on patent incentive policies and spillover effects within the treatment and control groups. Spatial DID models, including the spatial dependence between adjacent provinces, effectively investigate the spatial spillover effects of policies.
The number of academic patents granted (NGP) in each province is a common indicator of the output of academic patents, and the commercialization rate of academic patents (CAP) and the number of academic patents sold divided by the number of patents granted to the university are used as two explanatory variables in the research.
GDP per capita (PGDP), the number of universities (NCU) in a province, the teacher-to-student ratio (TSR), and the number of enterprises above the designated size (NIE) as indicators of the scale of large industrial enterprises in a region are four explanatory variables in the model.
Except for the policy variable
The data obtained from the China Statistical Yearbook span from 2011 to 2020, 10 years in 31 provinces, which makes 310 observations in total. The data on the commercialization of academic patents are obtained from the Compilation of Science and Technology Statistics in Universities, compiled by the Science and Technology Department of the Ministry of Education of China.
The population is divided into an experimental group comprised of 17 provinces, and a control group including 14 provinces. Two sets of models are consisted of fixed effect or random effect factorization and applied to Eqs. 25 and 26, totally four models (Table 2).
NGP | CAP | |||
---|---|---|---|---|
Model 1 | Model 2 | Model 3 | Model 4 | |
Fixed effects | Random effects | Fixed effects | Random effects | |
PGDP | 82.174*** (5.91) | 77.775*** (5.93) | 0.048* (1.65) | 0.049** (2.31) |
NCU | 200.218*** (8.46) | 82.571*** (5.16) | 0.195*** (3.92) | 0.018 (1.17) |
TSR | 109274.4*** (3.53) | 72722.79** (2.55) | 230.979*** (3.61) | 18.035 (0.38) |
NIE | −79.33*** (−2.74) | −52.884* (−1.83) | −0.135** (−2.24) | −0.091** (−2.2) |
DID | 1592.831** (2.28) | 1788.006** (2.48) | 4.394*** (3.02) | 3.251** (2.24) |
Year 2011 | −961.286*** (−2.85) | −621.956* (−1.75) | −2.409*** (−3.19) | 0.692 (0.88) |
….. Table | Omitted | intentionally | ||
0.652*** (7.89) | 0.616*** (−7.2) | 0.419** (2.58) | 1.864* (1.77) | |
….. Table | Omitted | intentionally | ||
Wald test of spatial terms | 62.25*** | 52.83*** | 6.66** | 100.93* |
Positively significant
SDID spillover effect develops indirect effects in adjacent areas, outperforming the DID model; that is, the indirect effect in models 3 and 4 of dependent variable CAP are insignificant. In this way, the policy effect in the neighborhood provinces is further segregated (Table 3).
The placebo tests in Table 4 show that there is no change of significance in the DID if the policy is implemented in the year before or after the actual year of implementation. The result is problematic to convince that the incentive patent policy promotes the outcome or commercialization of a patent. The DID is rather a placebo without an effect on the patent on its own, whereas a proxy of province systemic difference makes the diversity.
NGP | CAP | |||
---|---|---|---|---|
Model 5 | Model 6 | Model 7 | Model 8 | |
1 year earlier | 1 year later | 1 year earlier | 1 year later | |
PGDP | 82.595*** (5.92) | 82.703*** (5.96) | 0.049* (1.68) | 0.049* (1.7) |
NCU | 201.749*** (8.5) | 199.52*** (8.44) | 0.199*** (3.98) | 0.195*** (3.91) |
TSR | 106525.2*** (3.43) | 109694.8*** (3.55) | 223.24*** (3.48) | 230.945*** (3.6) |
NIE | −81.847*** (−2.82) | −76.23*** (−2.63) | −0.141** (−2.33) | −0.131** (−2.15) |
DID | 1480.638* (1.82) | 1624.062** (2.5) | 4.687*** (2.77) | 3.724*** (2.74) |
Year 2011 | −1040.216*** (−3.06) | −926.287*** (−2.75) | −2.669*** (−3.49) | −2.31*** (−3.06) |
Table | Omitted | intentionally | ||
0.654*** (7.91) | 0.65*** (−7.86) | 0.41** (2.5) | 0.432*** (2.71) | |
Table | Omitted | intentionally | ||
Wald test of spatial terms | 62.63*** | 61.76*** | 6.23** | 7.33* |
6. Conclusion
This chapter outlines the methodology and application of DID in spatial analysis. The impact of incentive policy on economic activities is controversial. The empirical evidence results from a correlation test rather than causality analysis. SDID as a tool to segregate the direct effect, indirect effect, and total effect in the fixed-effect and random-effect models finds a causal relationship between the policy and relevant economic activities under the influence while dealing with the spillover effects in quasi-natural experiments. The placebo effect of policy can expand the horizon of policy evaluation, which helps consolidate the scientific foundation of policy evaluation. Regional policies are proxies for other variables that characterize the systemic differences in policies between regions.
In the policy evaluation, the SDID reveals the spatial spillover effect on the neighborhood regions, causing them to imitate the policies and promote economic activities. It is not appropriate to study the policy effect independently, but a comprehensive evaluation from a local perspective is preferred.
Acknowledgments
I thank Jiafeng Gu, Tongying Liang, and Feifei Liang for their generous comments.
Stata Code
/*Create time fixed effect and individual fixed effects.*/
sort time id
by time: gen ind = _n
sort id time
by id: gen T = _n
/*Generate treat and post two dummy variables, with 2010 set as time spot of policy intervention and observations from 17 to 31 are treatment group, and rest is control group.*/
gen treat = 0
replace treat = 1 if id >17
gen after = 0
replace after = 1 if time > = 2010
/* Create Weight matrix:*/
spmatrix create idistance M /*spatial inversed distance matrix*/
spmatrix dir
spmatrix create contiguity W/*spatial distance matrix*/
spmatrix dir
estat moran, errorlag (W)
estat moran, errorlag (M)
gen treatafter = treat*after
spmatrix create contiguity W if year == 2010
spxtregress NGP treatafter PGDP NCU TSR NIE i.time,re dvarlag (W)
gen treatafter = treat*after
spmatrix create contiguity W if year == 2010
spxtregress CAP treatafter PGDP NCU TSR NIE i.time,re dvarlag (W)
/*General application*/
1)SAR-SDID
> spmatrix create contiguity W if year == 2010
>spxtregress NGP treatafter PGDP NCU TSR NIE i.time, re dvarlag (W)
2)SEM-SDID
> spmatrix create contiguity W if year == 2010
>spxtregress NGP treatafter PGDP NCU TSR NIE i.time,re errorlag (W)
3)SDM-SDID
> spmatrix create contiguity W if year == 2010
>spxtregress NGP treatafter PGDP NCU TSR NIE i.time, re dvarlag (W) ivarlag (W: X)
4)SXL-SDID
> spmatrix create contiguity W if year == 2010
>spxtregress NGP treatafter PGDP NCU TSR NIE i.time,re ivarlag (W: DX)
References
- 1.
Angrist JD, Pischke J. Mostly Harmless Econometrics: An Empiricist’s Companion. Princeton, NJ: Princeton University Press; 2008 - 2.
Cerulli G. Econometric Evaluation of Socio-Economic Programs: Theory and Applications. Advanced Studies in Theoretical and Applied Econometrics. Vol. 49. Heidelberg: Springer; 2015 - 3.
LeSage JL, Pace RK. Introduction to Spatial Econometrics. London, UK: Boca Raton: Chapman and Hall/CRC press; 2009 - 4.
Wooldridge JM. Econometric Analysis of Cross Section and Panel Data. Cambridge, MA: MIT Press; 2010 - 5.
Wooldridge JM. Introductory Econometrics: A Modern Approach. Boston, MA: Cengage Learning; 2015 - 6.
Arbia G. A Primer for Spatial Econometrics: With Applications in R. Basingstoke: Palgrave Macmillan; 2014 - 7.
Burrough PA, Mcdonnell RA, Lloyd CD. Principles of Geographical Information Systems. 3rd ed. Oxford: Oxford; 2014 - 8.
Angrist JD, Pischke J. Mastering Metrics: The Path from Cause to Effect. Princeton, NJ: Princeton University Press; 2015 - 9.
Meyer BD. Natural and quasi-experiments in economics. Journal of Business and Statistics. 1995; 13 (2):151-161 - 10.
Pomeranz D. Impact evaluation methods in public economics: A brief introduction to randomized evaluations and comparison with other methods. Public Finance Review. 2017; 45 (1):10-43 - 11.
St Clair T, Cook TD. Difference-in-differences methods in public finance. National Tax Journal. 2015; 68 (2):319-338 - 12.
Buerger C, Sandel RM, Reitano V, Lofton ML, Jones P. Extending differences-in-differences frameworks to Granger equations: Evidence from cutback management during three recessions. International Journal of Public Sector Management. 2021; 34 (6):688-705 - 13.
Granger CWJ. Investigating causal relations by econometric models and cross-spectral methods. Econometrica. 1969; 37 (3):424-438 - 14.
Carlson DE, Cowen JM, Fleming DJ. Third-party governance and performance measurement: A case study of publicly funded private school vouchers. Journal of Public Administration Research and Theory. 2014; 24 (4):897-922 - 15.
Athey S, Imbens GW. The state of applied econometrics: Causality and policy evaluation. Journal of Economic Perspective. 2017; 31 (2):3-32 - 16.
Gu J. Effects of patent policy on outputs and commercialization of academic patents in China: A spatial difference-in-differences analysis. Sustainability. 2021; 13 :13459
Notes
- http://www.census.gov/geo/maps-data/data/tiger-line.html