Constructing million-cell spatial weight matrices on irregular support: a kronecker-plus-projection workflow
摘要
This paper presents a sparse Kronecker-plus-projection workflow for constructing spatial weight matrices from large regular-grid data observed on irregular analytical support. The procedure combines common-support masking, sparse Kronecker construction of full-lattice contiguity, projection to the retained support, isolate removal, and row-standardisation. The contribution is methodological and practical, providing a transparent construction route for large gridded spatial weight matrices before likelihood evaluation or model estimation. We apply the workflow to Indonesia, where approximately 2.2 million of 11.3 million template cells belong to the common valid support. Benchmarks against a dense-output ‘spdep’ route and a raster-native terra::adjacent route show that the proposed workflow remains feasible at full national support and performs at the same order of magnitude as the raster-native sparse alternative. The dense-output route becomes infeasible once the retained support exceeds very small benchmark levels. A separate naïve dense-reference exercise illustrates the infeasibility of direct dense log-determinant computation at this scale.