Skip to main content
5 votes
Accepted

Compute Moran's I on more than one attribute

One does have to question the why here. What do you hope to achieve in evaluating multivariate autocorrelation? What hypothesis are you, in fact, testing? If this is in the context of a linear ...
Jeffrey Evans's user avatar
5 votes
Accepted

Testing species distribution model residuals for spatial autocorrelation?

Given an inevitable nonparametric model structure, a residual in the traditional sense is not possible. You could approximate the response, Pearson's or deviance (likelihood ratio chi-squared) ...
Jeffrey Evans's user avatar
5 votes

Moran's I on 2D arrays/rasters?

Eventually, with the help of Serge Rey's answer and this link in the documentation, I ended up using pysal's implementation as follows: import pysal as ps w = ps.lat2W(input_img.shape[0],input_img....
GStav's user avatar
  • 309
5 votes
Accepted

Calculating Moran's I on large point dataframe in R

I had this same problem. I created an R package that calculates the distance matrix on the fly, so it takes much less memory to calculate Moran's I. Its also quite fast. You can find it at github....
Amadou Kone's user avatar
5 votes
Accepted

Spatial outliers detection in R?

We can run through some straight-forward approaches starting with looking at the modified z-score on the variable of interest (a-spatial) then move to calculating the local z-score and variance within ...
Jeffrey Evans's user avatar
5 votes
Accepted

How to work with Spatial Autocorrelation (Morans I) on equal weighted point

You cannot use the Moran's I on an unmarked process. The values, at each location, are what the statistic is based on and therefore cannot be absent or uniform. Your only real option, in ArcGIS, for ...
Jeffrey Evans's user avatar
5 votes
Accepted

Are contiguity matrix and adjacency matrix the same?

Yes. An online comparer has this for "contiguous": The state of being adjacent or contiguous; contiguity; as, the adjacency of lands or buildings. I'd say "adjacent" was the ...
Spacedman's user avatar
  • 64.4k
4 votes

Interpreting semivariogram with high nugget effect?

I am wondering if someone can explain why the nugget seems so high? Does this mean that even at similar locations, there is still a relatively high degree of difference? Yes, a high nugget effect (...
Andre Silva's user avatar
  • 10.3k
4 votes

Defining strength of Moran's I

Yes. If I_A > I_B for two data sets A and B, then there's greater spatial autocorrelation, where spatial autocorrelation is defined by the formula for the Moran I (other measures of spatial ...
Spacedman's user avatar
  • 64.4k
4 votes
Accepted

Statistic for measuring (local) autocorrelation of ordinal data

In terms of a local autocorrelation (nonstationarity) statistics, there really is not one. Join-counts is adequate for hypothesis testing of global clustering in binary process, albeit very scale ...
Jeffrey Evans's user avatar
4 votes
Accepted

Constructing a raster with Moran's I close to -1

By defaults the Moran function uses the 8 neighbours of each cell. For your regular raster, 4 of these are the same and 4 are different to the centre cell. That's no autocorrelation. If instead you ...
Spacedman's user avatar
  • 64.4k
3 votes
Accepted

Moran's I on 2D arrays/rasters?

If the raster has r rows and c columns, then you can create a pysal W object with: w = pysal.lat2W(r,c) and use that with the Moran class. More details available at: https://pysal.org/libpysal/...
Serge Rey's user avatar
  • 131
3 votes
Accepted

Choosing value of Moran's I to say existence of spatial correlation?

I myself am still learning as much as I can about Moran's I, but I think I help figure out the answer to this question. There is a great video on coursera about spatial correlation: Based on the Z-...
mlane's user avatar
  • 160
3 votes

Geographically Weighted Regression with overlapping polygons

Most spatial weight matrix schemes are ad-hoc structures and don't have much bearing on the final model. So you could try various things, as long as they have the right properties. For examples: ...
Spacedman's user avatar
  • 64.4k
3 votes

Implementing Spatial Autocorrelation using QGIS or PostgreSQL or any other free application?

Art Lembo has a simple example of a pseudo-Moran's I for PostGIS: SELECT corr(a.pctwhite, b.pctwhite) FROM cleveland AS a, cleveland AS b WHERE st_touches(a.geometry, b.geometry) AND a."OID" <> ...
Bill Morris's user avatar
3 votes

Moran’s I (spatial autocorrelation) in QGIS or SAGA?

Yes, have a look at the following plug-in . In case this does not fulfill your requirements, I recommend you Crimestat IV. Their user guide provides an indepth spatial statistics analysis of data, ...
Roberto Zeeland's user avatar
3 votes
Accepted

poly2nb {spdep} not identifying neighbours correctly

Although I thought poly2nb used the "overlaps" test for determining adjacency, I do get a different set of adjacencies if I explicitly use st_overlaps and build an nb object. This looks closer to the ...
Spacedman's user avatar
  • 64.4k
3 votes
Accepted

Testing spatial autocorrelation for presence-absence records?

Let's make some data: > set.seed(123) > pts = st_as_sf(data.frame(x=runif(50),y=runif(50)),coords=1:2) > pts$S = factor(sample(c("Presence","Absence"),nrow(pts),TRUE)) >...
Spacedman's user avatar
  • 64.4k
3 votes

If a Moran's I value is close to 1, then why is it necessary to report the p-value?

It is important to additionally report the p-value because Moran's I values are often not standardized and so they are not comparable to each other. If you were trying to find the Moran's I of some ...
Randcelot's user avatar
  • 191
3 votes
Accepted

Moran's I statistical significance with spdep mc.moran function

This looks perfectly correct to me - you can reproduce the value of Moran(r) if you use queen=TRUE in the neighbour calculation and use style="B" in the weighted neighbour calculation, so ...
Spacedman's user avatar
  • 64.4k
3 votes

Getting different Moran indexes?

The p value is telling you if the uncertainty around the estimate includes zero. If you've got a very small estimate and a very very small uncertainty then you'll get a small p-value. It says there is ...
Spacedman's user avatar
  • 64.4k
3 votes
Accepted

Getting different Moran indexes?

To answer your question in brief, I would use spdep. It is tested against geoda and pysal and gives the same answer as both of those tools. The errors you were running into were likely caused by using ...
thus__'s user avatar
  • 179
2 votes
Accepted

Algorithm for spatial clustering?

Not sure if this suits your problem, because your data consists of non-discrete data. What I suggest is probably a brute force approach and maybe not very elegant. Anyways, there are some standard ...
sema's user avatar
  • 445
2 votes

Implementing Spatial Autocorrelation using QGIS or PostgreSQL or any other free application?

Apologies for the double answer here, but since posting my first suggestion I came across a more-comprehensive toolkit for doing all sorts of analyses like this (including both global and local Moran'...
Bill Morris's user avatar
2 votes
Accepted

Inputs for spatial autocorrelation

You need to put some thought into your experimental design and talk with somebody well versed in statistical analysis. In what you are describing, your experimental units are the transects and not the ...
Jeffrey Evans's user avatar
2 votes

Accounting for spatial autocorrelation in rasters

The autocorrelation of covariates is not the problem in itself. What may be a problem is if there is correlation of covariates at the position of data observations. In that case, there will be ...
Sébastien Rochette's user avatar
2 votes
Accepted

Statistical significance of Moran I

You could do a monte-carlo test of I>0: First lets create a very correlated raster: > r = raster(matrix(1:(50*50),50,50)) > Moran(r) [1] 0.9694908 And now do 99 Moran's I of rasters that are ...
Spacedman's user avatar
  • 64.4k
2 votes

Applying Moran's I across columns

Make a vector of your variable names either by subsetting the column names or programmatically, eg: vars = names(data_lisa)[2:5] vars = paste0("var_",letters[1:4]) For an example, I'm using ...
Spacedman's user avatar
  • 64.4k
1 vote
Accepted

Find optimal distance band after running Incremental Global Moran I with PySAL?

After a little research, I finally came up with the answer I was looking for. when using Global Moran's I index (I) with incrementally increasing distance searches (thus, changing the weight matrix at ...
Nick Pucino's user avatar
1 vote

What does first requirement for LISA statistic mean?

The key of the first requirement is related to the word significant. This implies that the observed pattern (i.e. a cluster / outlier) is not the result of a random process. To understand this, you ...
Temporalista's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible