help for spsiv Version 1.1, 22 Oct 25

spsiv - Create synthetic instrumental variables in spatial regression

Syntax

spsiv varlist [if] [in] , mmat(matname) [alpha(#)]

Description

spsiv generates synthetic instrumental variables from endogenous variables and spatial filters derived from a symmetric connectivity matrix. The synthetic instruments satisfy the conditions of a standard instrumental variable and generally avoid the weak instrumental variable problem due to relatively high correlation with the endogenous variable. spsiv works for both cross-sectional and panel data, provides IV-type instruments for use with spivreg, spivregress, xtdpdp, xtabond2, etc. For details, see Gallo & Paez (2013) and Fingleton (2023).

The spmat command is required and data must be spset.

The latest version of spsiv can be found at the following link: https://github.com/ManhHB94/

Options

*mmat(matname) specifies a symmetric connectivity matrix, which can be an adjacency matrix or based on some other distance measure. It is important that they are symmetric, so a convenient option is to use an unnormalized matrix. This option is required.

alpha(#) specifies the significance level used in the spatial filter generation process. The default value is 0.05.

Citation

spsiv is not an official Stata command. It is a free contribution to the research community. Please cite it as such:

Manh Hoang Ba, 2025. "SPSIV: Create synthetic instrumental variables in spatial regression," Statistical Software Components, Boston College Department of Economics.

Examples

* Cross-sectional data

copy https://www.stata-press.com/data/r19/homicide1990.dta ., replace

copy https://www.stata-press.com/data/r19/homicide1990_shp.dta ., replace

use homicide1990, clear

spset

spmat idistance m _CX _CY, id(_ID) dfunction(dhaversine) replace

spsiv ln_population ln_pdensity gini, m(m) a(0.1)

* Panel data

copy https://www.stata-press.com/data/r19/homicide_1960_1990.dta ., replace

copy https://www.stata-press.com/data/r19/homicide_1960_1990_shp.dta . , replace

use homicide_1960_1990, clear

xtset _ID year

spset

preserve

keep if year==1990

spmat idistance m _CX _CY, id(_ID) dfunction(dhaversine) replace

restore

spsiv ln_population ln_pdensity gini if year==1990, m(m) a(0.1)

References

Fingleton, B. (2023). Estimating dynamic spatial panel data models with endogenous regressors using synthetic instruments. Journal of Geographical Systems, 25(1), 121-152.

Le Gallo, J., & Paez, A. (2013). Using synthetic variables in instrumental variable estimation of spatial series models. Environment and Planning A, 45(9), 2227-2242.

Authors

Manh Hoang Ba, Eureka Uni Team, Vietnam
hbmanh9492@gmail.com

Also see

Online: help for spset, spmat , spivreg (if installed), xtabond2 (if installed), spxtabond2 (if installed).