Skip to contents

Spatial Unit Root Tests

Diagnostic tests for spatial unit roots

Spatial Transformations

Spatial differencing to remove unit roots

spurtransform()
Spatial Differencing Transformations

Spatial Half-Life

Confidence intervals for spatial persistence

spurhalflife()
Confidence Intervals for Spatial Half-Life

Datasets

Example datasets

chetty
Chetty et al. (2014) Commuting Zone Data

Package

Package information

spatialunitroot spatialunitroot-package
spatialunitroot: Spatial Unit Root Diagnostic Tests and Transformations

Internal

Internal functions (C++ backend and computation)

apply_transform()
Apply transformation matrix to a variable
check_missing()
Check for missing values in a matrix and report
cluster_matrix()
Compute cluster transformation matrix
compute_distances()
Compute distance matrix from coordinates
double_center()
Double-center a matrix (subtract row means, then column means)
euclidean_distances()
Compute Euclidean distance matrix
find_ha_parm_i0()
Find ha_parm g for I(0) test
find_ha_parm_i1()
Find ha_parm for I(1) test (R implementation)
get_R()
Get top q eigenvectors of a symmetric matrix
getcbar()
Find c such that mean(exp(-c * lower_tri(distmat))) equals rhobar
getcbar_r()
Get cbar: find c such that mean(exp(-c * lower_tri(dist))) = rhobar
getpow_qf()
Compute power of quadratic form test
getpow_qf_r()
Compute power of quadratic form test (R implementation)
haversine_distances()
Compute Haversine great-circle distance matrix
iso_matrix()
Compute isotropic transformation matrix
lbm_gls_matrix()
Compute LBM-GLS transformation matrix
lvech()
Half-vectorization: extract lower triangular elements (excluding diagonal)
nn_matrix()
Compute nearest-neighbor transformation matrix
normalize_distances()
Normalize distance matrix so maximum distance is 1
resolve_coords()
Resolve spatial coordinates from various input formats
sigma_dm()
Compute demeaned spatial covariance with exponential decay
sigma_lbm()
Compute LBM covariance matrix from distance matrix
sigma_lbm_dm()
Compute demeaned LBM covariance matrix
sigma_residual()
Compute residual-projected spatial covariance
spatial_i0_core()
Spatial I(0) test (R implementation)
spatial_i0_resid_core()
Spatial I(0) residual test (R implementation)
spatial_i0_test()
Spatial I(0) unit root test
spatial_i0_test_residual()
Spatial I(0) residual unit root test
spatial_i1_core()
Spatial I(1) test (R implementation)
spatial_i1_resid_core()
Spatial I(1) residual test (R implementation)
spatial_i1_test()
Spatial I(1) unit root test
spatial_i1_test_residual()
Spatial I(1) residual unit root test
spatial_persistence()
Compute spatial half-life confidence interval
spatial_persistence_core()
Spatial half-life confidence set (R implementation)