Skip to main content
When and How to Use Restricted Spatial Regression to Separate Environmental Effects from Spatial Confounding

When and How to Use Restricted Spatial Regression to Separate Environmental Effects from Spatial Confounding

This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

Add a Comment

You must log in to post a comment.


Comments

There are no comments or no comments have been made public for this article.

Downloads

Download Preprint

Authors

Raquel Ruiz Diaz, James T Thorson

Abstract

Aim: To provide practical guidance for ecologists on when to use standard spatial generalized linear mixed models (SGLMMs) versus Restricted Spatial Regression (RSR). We reframe the debate by arguing the choice depends on whether the total effect or direct effect of covariates will be more transferable across space.

Innovation: Our study's primary innovation is to introduce a causal framework to this debate. We distinguish between the SGLMM, which estimates the direct effect by controlling for unmeasured spatial confounders, and the RSR, which estimates the total effect by incorporating pathways through unmeasured spatial mediators. We also provide the first implementation of the RSR estimator in the widely-used tinyVAST R package.

Main conclusions: The choice of model must be driven by the ecological goal and underlying assumptions. 1) The SGLMM is the appropriate tool for hypothesis testing and conditional ``in-sample" prediction (interpolation), where it accounts for lower degrees of freedom due spatial autocorrelation. 2) The RSR estimator, despite its highly inflated Type I error, is superior for unconditional prediction (forecasting). This is particularly true when the unmeasured spatial process can be assumed to have a fixed (stationary) sample correlation with the covariates over space. The RSR estimator implicitly incorporates this confounding relationship, making it more effective for predicting total effects in a new, unobserved area where the spatial pattern of confounding is expected to persist. We recommend a two-step conceptual approach: use the SGLMM for robust variable selection, then, if forecasting is the goal and the unmeasured process has a fixed correlation with covariates, use the RSR estimator for total effect predictions.

DOI

https://doi.org/10.32942/X28351

Subjects

Life Sciences

Keywords

spatial generalized linear mixed model, Gaussian Markov random field, climate forecast, species distribution model., Gaussian Markov random field, climate forecast, species distribution model

Dates

Published: 2025-09-10 08:47

Last Updated: 2025-09-10 08:47

License

CC-BY Attribution-NonCommercial-ShareAlike 4.0 International

Additional Metadata

Conflict of interest statement:
The authors have no conflicts of interest to report.

Data and Code Availability Statement:
Code and data are publicly available https://github.com/Raquel-RuizDiaz/Spatial_confounding_tinyVAST

Language:
English