Open Aariq opened 2 months ago
Possibly helpful: Moran's I for estimating spatial autocorrelation of residuals. E.g.
years <- 1981:2023
walk(years, \(.x) {
gdd_df |>
mutate(.resid = residuals(m_reml)) |>
filter(year == .x) |>
select(x, y, .resid) |>
rast() |>
autocor(global = FALSE) |>
plot(main = paste("Moran's I for", .x))
})
Or just get a single number with ... |> rast() |> autocor(global = TRUE)
. This could be useful for comparing REML and NCV to check that it actually helps with spatial autocorrelation. Residuals should show no autocorrelation.
A follow up on comments in #25.
So far NCV (as opposed to REML) seems like it is going to be the way to go. A lot needs to be done to make it work still though, and it's possibly not worth it (or it goes in a separate paper).
Create(temporal autocorrelation appears to not be an issue)nei
object with 3D "neighborhoods" (x, y, and time) to deal with short-range temporal autocorrelation