If the rasters have the same basis (extent, resolution etc) then you just get the values and plot them. Something like:
I'm not sure exactly what the "correlation of determination" is, but the simple "correlation" can be computed by:
Note these are both dependent on the rasters having identical ...
It seems that you are over complicating this problem. Just because data is spatial does not mean that you are compelled to apply a spatial statistical model.
If you distill down your question, all you are after is a statistical relationship between rate of illness (rate_ill) and distance to water (disw). This can be tested using a simple bivariate linear ...
the difference between roughness and slope is a question of scale. I recommend that you think about the resolution of your raster at which you observe the slope but you don't see the roughness anymore, then you can smooth your surface (e.g. using a low pass, a mean filter or some spline) at this resolution. This will yield a new surface with zero roughness, ...
You can solve this using R. The below code produces a scatter plot with linear regression and a Pearson correlation value. Because you're solving in R you have access to a massive range of statistical tools.
# read rasters
r1 = raster("/dir/dir/file1.tif")
r2 = raster("/dir/dir/file2.tif")
# Resample r2 to r1
You might want to consider using some freeware such as GeoDa or Crimstat for running spatial correlation analysis. I found them way more useful than ArcGIS for that type of thing if you're willing to give them a go!
Firstly make a decision if you will be satisfied with a regression, the type of analysis that can be performed in a spreadsheet program. That regression might be linear or polynomial etc, with a calculation of R2.
Then it is a matter of gathering values for each of the layers at a series of points.
For repeat analysis, the best practice method is to make a ...
Here are two approaches to compute correlation coefficients with Raster objects (notwithstanding the comments on your question about utility; that I concur with).
# generate some data
b <- brick(system.file("external/rlogo.grd", package="raster"))
d <- b
d <- runif(ncell(b)*nlayers(b))
s <- stack(b[[1:2]], d[[1:2]],...
It is very unlikely that this problem follows parametric assumptions. I would recommend exploring nonparametric group tests, available in R, such as: Mann-Whitney (wilcox.test), Wilcoxon Signed Rank (wilcox.test), Kruskal Wallis (kruskal.test), Friedman Test (friedman.test).
You could also apply a Monte Carlo sampling approach, lbl_test in coin or ...
It is really quite straightforward to obtain a Pearson's correlation coefficient. Given a population assumption:
xBar = mean(x)
yBar = mean(y)
xyBar = mean( (x * y) )
covariance = xyBar - xBar * yBar
correlation = covariance / ( sd(x) * sd(y) )
Unless your points represent a true sample (e.g., field data), there is no need to subsample. This equation ...
You can use the Image Correlation, Image Regression, and Feature Space Plot tools in Whitebox Geospatial Analysis Tools to achieve this. It works on whole images, with the caveat that when you have very high sample sizes (i.e. millions of pixels) even very small differences will yield statistical significance, which may not be physically meaningful.
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 domain categories will be available to you as a template which can help fill out the attribute table for you.
I'll expose the solution with two random datasets, one for temperature and one for precipitation:
r <- raster()
t1 <- setValues(r , rnorm(n=64800,mean=16,sd=1))
t2 <- setValues(r , rnorm(n=64800,mean=18,sd=1))
t3 <- setValues(r , rnorm(n=64800,mean=20,sd=1))
t4 <- setValues(r , rnorm(n=64800,mean=22,sd=1))
t5 <- setValues(...
Please note that I already 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 autocorrelated adjusted correlation coefficient, F-statistic,
p-value and the Moran's-I value for x and y, within a specified
window. There ...
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 simple example.
Add libraries and data
coordinates(meuse) <- ~x+y
In the crossCorrelation function, as a ...
I would personally do this as rasters, each normalized on a 0-1 scale. Multiply the two together, and you have a quick-and-dirty visualization: the closer to one, the higher the correlation.
A more statistical (and perhaps more robust) approach would be to use Band Collection Statistics, which gives you text output of the correlation between the two rasters....
Doing regression entirely within a GIS is a bit of a tour de force, but it is possible (and perhaps has some merit when incorporated within a longer workflow that would otherwise be interrupted by the use of a statistical computing platform.)
Whenever you have a huge set of matched data (X,Y), such as afforded by two collocated rasters, then the ordinary ...
The easiest way as @Erica suggests is to do the correlation analysis in Excel. To do that you need to have the data.
In QGIS this is easy to get with the Point Sampling Tool plugin. Install this through the plugin manager, add both your raster and your points to the map, and the tool can be used to create a new dataset with the associated data. The you can ...
If your objective is to get straight line distances between your faults and your springs, I also recommend using the Linear Reference approach in addition to the Near tool. The Locate Features Along Routes tool provides additional information that the Near tool does not provide. It tells you the relative position along your fault where the point falls so ...
You should use "Extract Values to Points (Spatial Analyst)", to join pixel values to your point feature class. Make sure to check "Interpolate values at the point locations" so any missing value gets interpolated based on its surrounding pixels.
you will end up with a point feature class containing both plant area and soil moisture as attributes. To find ...
If I understand you correctly, you want to test sample variation. That is to say, how well your sample distribution matches your population (raster) distribution. This is not a correlative relationship and is commonly done by comparing the sample mean and variance against the population.
Here is an example where I calculate mean, variance and quantiles for ...
Expanding on my comment above
What you're probably going to end up wanting to do is run a linear regression with spatial lag, which accounts for the spatial correlation of some of your variables (I'm going to have to look at my notes on this).
Luc Anselin has been a pioneer in this space, and you should have a look at his work, especially the (free) tools ...
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.
#read in rasters
r1 <- raster("IMG_0003_1.tif")
r2 <- raster("IMG_0003_2.tif")
r3 <- raster("IMG_0003_3.tif")
r4 <- raster("...
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 weighted sum tool, or perhaps perform the calculations yourself in raster calculator to create a final raster that displays a score that is derived from the ...
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 number of points with which you would like to represent your data and choose the extent of your rasters. Next, you can use the Extract Multi Values to Points ...
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 outline taken from Quick-R):
# Multiple Linear Regression
fit <- lm(density ~ lat + lon, data=DensityDataFrame)
summary(fit) # show results
# Other useful ...
The arcpy way of doing this would be (this method is for running two data sets at a time):
After buffering each point layer, use Make Feature layer method on each point layer
Define update cursor on the update layer
Create a counter integer variable
Within update cursor use select layer by attribute to select first update feature (FID or OID = 0 or whatever ...
Are you familiar with the "select by position" tool from the QGIS vector tools (vector--> research tools--> select by position)?
Simply select the point layer as the source layer and the buffer layer as the overlaying layer.
You can then save the selection if needed and perform further analysis on the selection.
Hope this helps
Fill your DEM, output - FILLED
Use raster calculator Con (FILLED>DEM, FILLED-DEM), output -DEPTH
Con (DEPTH>=0,INT (1)). Output - DEPRESSIONS.
Convert them to polygons and remove smalls, they are just a noise in your DEM. Output - ZONES. Give them unique names.
Calculate flow direction and flow accumulation -FACC
Use zonal statistics over DEPTH (mean), FACC (...