Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore/implement NCV #1

Open
1 of 3 tasks
Aariq opened this issue Nov 20, 2024 · 0 comments
Open
1 of 3 tasks

Explore/implement NCV #1

Aariq opened this issue Nov 20, 2024 · 0 comments

Comments

@Aariq
Copy link
Member

Aariq commented Nov 20, 2024

I'm more and more convinced that we don't need this, but it might still be good to explore. Copied from usa-npn/cales-thermal-calendars#30

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

  • Do comparisons to REML with the end product—marginal slopes
  • Create nei object with 3D "neighborhoods" (x, y, and time) to deal with short-range temporal autocorrelation (temporal autocorrelation appears to not be an issue)
  • Get correct # of knots

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.

@Aariq Aariq mentioned this issue Dec 12, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant