Tag Info

Doing spatial correlation between two sets of rasters in R

I provided an answer in the comments: "There is a function "raster.modifed.ttest" in the spatialEco package for applying Dutilleul's modified t-test. This will return rasters of the ...
• 31.9k

Resolution unit calculation

There is no a fixed pixel size in GIS realm. Rasters (image files) may have different pixel sizes. Therefore, these equations are not absolute even if it is correct for the pixel of your raster. For ...
• 77.2k
Accepted

How to compute partial correlation of pixels in R

Lets first make some test data: sos = rast(array(runif(10*10*20),c(10,10,20))) tem = rast(array(runif(10*10*20),c(10,10,20))) pre = rast(array(runif(10*10*20),c(10,10,20))) NDVI = rast(array(runif(...
• 64.6k
Accepted

Calculating pairwise Spearman's correlation coefﬁcients for multiple raster layers in R

First convert the rasters to variables in the same dataframe, then calculate the pairwise correlations and use the package 'corrplot' to display the results in a matrix. #dependencies library(raster) ...
• 2,927
Accepted

Correlation/relationship between map layers in R?

For your point data on asthma instances and rainfall (as long as it is not interpolated raster data) you can look at the spatial cross-correlation following Chen(2015) & Anselin(1995). Here is a ...
• 31.9k
Accepted

Pearson correlation in R?

I'll expose the solution with two random datasets, one for temperature and one for precipitation: library(raster) r <- raster() t1 <- setValues(r , rnorm(n=64800,mean=16,sd=1)) t2 <- ...
• 13.7k
Accepted

Correlating number values with text values from different fields in ArcMap?

What you want is a coded domain. In addition to being a more efficient way of storing the data (it manages the lookup table for you); you can also symbolize by category while editing and each of the ...
• 317
Accepted

ArcGIS- Band collection statistics tool correlation less than -1?

One possible reason could be different data types. I would check data types for each rasters and also convert them as floats.
• 76

Pixel correlations from two raster datasets in R

For reference, here is an approach, in memory, that uses mapply. This is one of the lesser known apply functions in R that lets you apply a function across objects. Here, when I create objects from ...
• 31.9k

Pixel based Correlation for 2 Rasters

Look at this answer to Doing spatial correlation between two sets of rasters in R for some clarity on your problem and take note that, the way you are describing your analysis, the results would be ...
• 31.9k
Accepted

Pixel based Correlation for 2 Rasters

Download and install latest QGIS with GRASS GIS. The tool is r.covar under the GRASS tools. It outputs the covariance/correlation matrix.
• 841
Accepted

Error while exporting plots results from cor function in a for loop over subfolders

sampleRandom needs the whole brick (or raster) fed to it, you are feeding it the vector of values with d[]. Reproducing your error, minimally: > r1 =raster(matrix(1:12,3,4)) > r2 =raster(matrix(...
• 64.6k
Accepted

Calculating correlation between points and raster values with missing points (need missing as 0s) (QGIS)

you have several ways to calculate the correlation between a raster and points, or between two aligned rasters. You can use Grass or SAGA tools, or do it by programming. Areas with no yield value ...
• 1,284
Accepted

Correlation analysis between bands in a RasterStack using Google Earth Engine

The error is telling you that the ee.Reducer.pearsonsCorrelation() function does not require any arguments. When you call it in var correl = ee.Reducer.pearsonsCorrelation(stack), you give it an ...
• 168
1 vote

QGIS point cluster correlation

One way is to rasterize one of the point layers. Then use SAGA -> Geostatistics -> Multiple Regression Analysis (Points/Raster). It will give you the correlation between the two dispersions.
• 1,220
1 vote

Correlation coefficient and R squared in Google Earth Engine

I was also looking to calculate R2 between two images, and couldn't find a reducer to do this -- only for the Pearson correlation coefficient. Here is my current solution showing both (Pearson ...
• 1,264
1 vote

Creating correlation chart in GEE

This could be one approach: First do the linear regression with reduceRegion(), to get the coefficients of your trend line and R2. Combine your NDVI and LST into a single image and sample it. Map over ...
• 14.3k
1 vote
Accepted

Accurately estimating non-linear relationship between two rasters

This is basically the whole of statistics. Given you simulated the data from a quadratic with a specified random noise, ideally you'd get that back as your "expression of the relationship between ...
• 64.6k
1 vote
Accepted

How to select one band in image using rasterio

I don't have a SAR image so, I assumed that this image has same values as NDVI image. Result of this kind of linear regression, approximately, would be a straight line with slope 1 and intercept 0. ...
• 30k
1 vote

How to correlate NDVI and Land Surface Temperature in QGIS?

For what you want I recommend you to use SAGA, it is very easy and direct. SAGA is automatically installed with QGIS. If you are in windows go to start > all programs > QGIS 3 > SAGA GIS I ...
• 1,284
1 vote
Accepted

Correlating Worldclim data with vif function in R

Your object bioFinal is only the names of the files, there's no step where they are read in in the code you post; as a list they are a character vector, thus the error. First you have to read them in ...
• 3,486
1 vote

Assessing if two variables (measured at point locations) covary in space?

This is a common question in fields like pollution tracking and exploration geochemistry but it is seldom straightforward. The fact you seem to have a positive correlation using (non-directional) ...
• 1,423
1 vote
Accepted

Correlating Point Samples and MODIS SST in Google Earth Engine

If you are interested in the MODIS sst of a composite image between the dates you have set at every of your sample points, you can simply use reduce regions: var addTempMODIS = modisSST.reduceRegions(...
• 10.1k
1 vote

Using a template matching correlation image to extract lines

You can use the "line extraction" to detect the lines. Here's a tutorial tutorial with sample dataset. http://community.ecognition.com/home/line-extraction
• 854
1 vote

Test Statistic, p-value interpretation for Local Moran's I

Unfortunately, the global or local Moran's-I is not at all appropriate for multi-temporal data. There is a bivariate version of the statistic, available in GeoDa that can be used to compare two time-...
• 31.9k
1 vote

Autoregressive parameter from autocorrelation using R

If you just want to spatially lag your variable for an autoregressive model an alternative is the autocov_dist in the spdep package. For more complex representation of spatial structure, that could be ...
• 31.9k
1 vote

Correlation between layers

In determining correlation between layers, one method to use is the "point data" and "rank field" you have in your attribute data. For suitable assessment, i suggest your points should not be less ...
• 345
1 vote

Correlation between layers

Perhaps a heat-map type analysis would be suitable. You could convert the proximity to settlements into a raster (with the ranking score being the raster value). After that you could then use the ...
1 vote

Finding correlation between two rasters in ArcGIS for Desktop?

It is likely statistical overkill to sample every single cell in your rasters. For the same statistical result, you could create a random point layer with the Create Random Points tool and choose the ...
• 1,011
1 vote

Is there a spatial gradient in my data

One option would be to look at a multivariate regression in R. Let us assume that you have create a data.frame with your density, lat & lon. Then you can do something along these lines (rough ...

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