[R-sig-Geo] Trying to compute Moran's I for the first time.
Iraida Redondo
|r@|d@redondog@r @end|ng |rom gm@||@com
Mon Jul 12 17:48:28 CEST 2021
Hi everyone.
My name is Iraida. It's my first time joining a mail list and also doing
spatial analysis, so sorry if any of my issues are basic. I've spent a lot
of time searching the internet and contacting researchers that made
analyses on spatial autocorrelation but any of my attempts seems to work.
Just for a little background, I work with a wild population of birds that
prospect a lot into their conspecific nest boxes. We want to know if this
prospecting behaviour has to do with breeding habitat selection. After
reading the literature, I see that is mandatory and very recurrent to check
for spatial and temporal autocorrelation of reproductive success in wild
populations. This reproductive success is thought to integrate
environmental factors. So, patchiness and predictability of reproductive
success would act as a proxy of habitat heterogeneity and information
reliability, thus both are needed for individuals to be able to make a
habitat choice and use information. I would like to compute a Moran's Index
to check for spatial autocorrelation, however I can't find the solution!
We have a nest box (N= ~250) population in a colony and I have collected
the reproductive success of the last 7 years for each of the nest boxes.
I have used this code for calculating Moran's I for a single year and
making a correlogram, by advice of a researcher who I asked for help. In
this script, the spantree function is a procedure to find the smallest
distance keeping all unit sampling linked. And I used it because it's being
difficult to decide the lag distance.
*starling <- read.csv("starling.csv", header = TRUE, sep =
";")str(starling)geo=starlingcoordinates(geo) <-
~longitude+latitudeXYstarling=coordinates(geo)xy.dl=rdist.earth(XYstarling,
miles = FALSE)diag(xy.dl) <- 0
spanning=spantree(xy.dl)dmin=max(spanning$dist)dmax=max(xy.dl)plot(coordinates(geo))nb1
=dnearneigh(as.matrix(XYstarling), 0, dmin, longlat = TRUE)correloresm1 =
sp.correlogram(nb1, starling$rs, order = (dmax/dmin), method = "I",
zero.policy = TRUE)plot(correloresm1)*
However, the sp.correlogram function tells me the following: "too few
included observations in higher lags: reduce order'. But I can't make it
work. I think that the distribution of my nest boxes has to do with this
error, as a great number of them are distributed in trios and at low
densities, while the rest are uniformly distributed and closer to each
other.
I am new at spatial analysis and my advisor can't help me on this and this
is just an assumption check that I have to do to continue with my research.
I would like to know if there is any way to keep it as simple as possible
to keep moving forward.
Thank you so much in advance.
Kind regards.
Iraida
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list