usa-npn / cales-thermal-calendars

Estimating trends in phenology in the northeastern US
https://usa-npn.github.io/cales-thermal-calendars/spatial-trends-report.html
MIT License
0 stars 0 forks source link

Explore geographically weighted regression #2

Closed Aariq closed 5 months ago

Aariq commented 5 months ago

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

Aariq commented 5 months ago

There are some notes on spatial GAMs in notes/Spatial GAMs.R

Aariq commented 5 months ago

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"
)

Screenshot 2024-03-29 at 1 54 56 PM

p-values have been adjusted for false-discovery rate

Aariq commented 5 months ago

In contrast, with the pixel-wise regression there are no areas that are statistically significant after false-discovery rate correction of p-values

Screenshot 2024-03-29 at 1 51 55 PM