Closed Aariq closed 5 months ago
There are some notes on spatial GAMs in notes/Spatial GAMs.R
Here's a spatial GAM example with downscaled data for speed (still needs some verification that I'm doing this all right):
m3a <- gam(
doy ~ te(y, x, year_scaled, d = c(2, 1), bs = c("sos", "cs")),
data = doy_df,
method = "REML"
)
p-values have been adjusted for false-discovery rate
In contrast, with the pixel-wise regression there are no areas that are statistically significant after false-discovery rate correction of p-values
Geographically-weighted regression may be more appropriate than pixel-wise regression, especially if we are interested in interpreting statistical significance (which isn't really appropriate with thousands of p-values). It is kind of an intermediate between a global regression (all data, no spatial information accounted for) and pixel-wise regression. Spatial GAMs are another option.
Relevant readings:
Charlton, M., Fotheringham, A.S., 2009. Geographically Weighted Regression. National Center for Geocomputation, Maynooth, Co Kildare, Ireland.
Comber, A., Brunsdon, C., Charlton, M., Dong, G., Harris, R., Lu, B., Lü, Y., Murakami, D., Nakaya, T., Wang, Y., Harris, P., 2023. A Route Map for Successful Applications of Geographically Weighted Regression. Geographical Analysis 55, 155–178. https://doi.org/10.1111/gean.12316
Comber, A., Harris, P., Brunsdon, C., 2022. Spatially Varying Coefficient Regression with GAM Gaussian Process splines: GAM(e)-on. AGILE GIScience Ser. 3, 1–6. https://doi.org/10.5194/agile-giss-3-31-2022