-
Notifications
You must be signed in to change notification settings - Fork 23
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
testSpatialAutocorrelation() returns an ape: :Moran.I error #190
Comments
There is with near certainty some problem in your data structure. Check:
I should probably check these things and implement a more meaningful error message. Best, |
Thanks for your suggestions Florian. After digging into the structure of my data set, I did indeed find the problem there. One of my sites had two separate locations in space, resulting in two unique coordinate points for one site with the same ID. This resulted in one extra value in 'coords' compared to the number of residuals in 'groupedSims'. After giving the two locations unique site IDs and re-running the code above, Cheers, |
Hi Sarah, thanks for the feedback - I'll keep the issue open as a reminder to implement a more meaningful error message. Best, |
@EttnerAndreas - could you have a look at this? |
Hello,
I have a data set of multiple locations (approx. 14 000 unique coordinate points) that have been sampled multiple times over ~10 years. I'm building mixed models with these data and I want to test the residuals for spatial autocorrelation. Following this package's recommendations, I used
recalculateResiduals()
to account for the multiple samples for each location as follows:This works fine up to the point where I use
testSpatialAutocorrelation()
. First I isolated one year's worth of coordinate points so that I have a data frame of unique coordinates to refer to. Then I plugged in these unique coordinates intotestSpatialAutocorrelation()
:This returns the error:
Any ideas about what might be going on and how to resolve this problem?
Thank you!
The text was updated successfully, but these errors were encountered: