<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Pearson correlation in raster datasets in Spatial Statistics Questions</title>
    <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279291#M898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to make a correlation between two raster datasets. I want to use Raster Calculator, but I'm still finding a bit difficult to work it out. I have the formula from statistics books, and I know that I'm required to multiply, and add the grids, right? But it's not so straight forward. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How am I supposed to find N, for instance? Should I just multiply the Columns and Rows from my grid to see how many pixels I have on the dataset? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The formula for the Pearson correlation coefficient is quite long and I don't think I should attempt to do everything in one go. I reckon I should do it by different stages. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas would be very welcome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a couple more things about the two datasets: one of them is a NDVI that I acquired from LANDSAT 5TM, and the other raster has been originated from an interpolation of points (rainfall gauges). I have used Mask on both grids, therefore they have the same number or rows and columns (same number of pixels?). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your time. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Sep 2010 14:51:17 GMT</pubDate>
    <dc:creator>AlanFernandes</dc:creator>
    <dc:date>2010-09-27T14:51:17Z</dc:date>
    <item>
      <title>Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279291#M898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to make a correlation between two raster datasets. I want to use Raster Calculator, but I'm still finding a bit difficult to work it out. I have the formula from statistics books, and I know that I'm required to multiply, and add the grids, right? But it's not so straight forward. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How am I supposed to find N, for instance? Should I just multiply the Columns and Rows from my grid to see how many pixels I have on the dataset? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The formula for the Pearson correlation coefficient is quite long and I don't think I should attempt to do everything in one go. I reckon I should do it by different stages. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas would be very welcome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a couple more things about the two datasets: one of them is a NDVI that I acquired from LANDSAT 5TM, and the other raster has been originated from an interpolation of points (rainfall gauges). I have used Mask on both grids, therefore they have the same number or rows and columns (same number of pixels?). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your time. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 14:51:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279291#M898</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-09-27T14:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279292#M899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bill,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your reply. I will try what you suggested and I should be coming back here with either some results for discussions (or more questions!) if that's okay. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a couple of things regarding the interpolation. My area of study is data scarce and I didn't have a choice. I would have only three points of NDVI where the data was actually collected. I think I will take the risk and still use the interpolation/NDVI analysis - or do you think the results would be worthless? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 17:41:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279292#M899</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-09-27T17:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279293#M900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again Bill, I hope you'll see this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get my head around some of your instructions, but with no success. Now I have the indicator grid for the overlapping datasets, but I'm very confused with how to use it in the calculations. I don't think I quite understood the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;�?�Wherever you see an ordinary unary or binary arithmetic operation in the formula (including, but not limited to, negation, addition, subtraction, multiplication, division, and powers), use the same one in Map Algebra.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;�?�Wherever you see a sum over cases compute a zonal sum. If the sum is divided by N it's really an average so just use a zonal average for the whole thing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That went straight over my head - really sorry. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have the chance to clarify that - it would be so much appreciated. I will keep on trying in the meantime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 12:26:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279293#M900</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-09-28T12:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279294#M901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot for that, Bill. You've been a great help. Very much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 16:38:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279294#M901</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-09-28T16:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279295#M902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bill,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following the instructions you gave me above, I still have some doubts if what I'm doing is correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I followed the steps, but some there's some confusion:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the formula xi_i = (x_i - m)/s, for instance, the zone grid is x_i, correct? I'm not sure how to obtain that zone grid (and I'm sure this is really simple!). Is this anything to do with the indicator grid I created initially? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another question is regarded the zonal average of [xi]*[eta] that you mentioned. Do I obtain that by simply multiplying those two grids and dividing it by N?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 10:58:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279295#M902</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-09-30T10:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279296#M903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Bill,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I've figured it out now. And yes, it was very simple. But feel free to make any comments. I'm new to all this, so any reassurance is more than welcome. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 14:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279296#M903</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-09-30T14:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279297#M904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bill, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm getting very strange results for the correlations, so I'm assuming there's something wrong with the way I'm creating the zone grid, unfortunately. I don't seem to get this one constant value at every cell that you mentioned above. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the formula for the standardized values xi_i = (x_i - m)/s the one that should be used to create this grid? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used the indicator to produce grids of the means ([mX] and [mY], and standard deviations ([sX] and [sY]). But in the formula above, what will be the x_i? I know this should be a very straight forward operation, but I'm sure what I'm doing is wrong. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 09:20:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279297#M904</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-10-03T09:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279298#M905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bill,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My question remains: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if I�??m computing Z as (&lt;X&gt; - &lt;M&gt;)/&lt;S&gt; for grids &lt;X&gt; (the original data), &lt;M&gt; (a constant grid equal to the mean of &lt;X&gt; throughout the zone), and &lt;S&gt; (a constant grid equal to the sd of &lt;X&gt; within the zone),&lt;/X&gt;&lt;/S&gt;&lt;/X&gt;&lt;/M&gt;&lt;/X&gt;&lt;/S&gt;&lt;/M&gt;&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by &lt;X&gt; (original data) do you mean:&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) �?? the sum of &lt;X&gt; using the INDICATOR grid (created earlier) in the �??feature zone�?� field on SA Zonal Statistics, VALUE in the SA �??zone field�?�, and the ORIGINAL DATA &lt;X&gt; as the �??input raster�?� field? &lt;/X&gt;&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If that�??s the case, my result will be a range of values (high to low), which will give me 2 values for a correlation in the end. Note that I will be doing the same thing for the &lt;Y&gt; original value, which will also give me �??high to low�?� values. &lt;/Y&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) �?? if by &lt;X&gt; (original data) you mean the raw raster data (say, my NDVI data), I will also have �??high and low�?� values.&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, my only question is: what exactly is &lt;X&gt; in the formula (&lt;X&gt; - &lt;M&gt;)/&lt;S&gt;? &lt;/S&gt;&lt;/M&gt;&lt;/X&gt;&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for being such a hard work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 09:12:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279298#M905</guid>
      <dc:creator>AlanFernandes</dc:creator>
      <dc:date>2010-10-06T09:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279299#M906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a great example of how incorporating R Statistical Software into ArcGIS would be a huge benefit. R has no problem calculating correlations on data that are provided as an "array", i.e. rows and columns. There is no need to reinvent the wheel, although it does make for an interesting excercise.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My advice would be to abandon ArcGIS for the heavy lifting and just download R. It's notoriously ugly to program, but with a few Google searches I bet you could write correlation scripts in a couple of hours. Using Python, R, and rpy2 I've written script tools to automate this procedure. But....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One issue I haven't been able to resolve is the reliability of correlation coefficients when the data are spatially autocorrelated, &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/Spatial_analysis#Spatial_dependency_or_auto-correlation"&gt;which may be a problem.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll get off my soapbox now, but this is an area in which I would love to see more improvement.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 19:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279299#M906</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2010-11-24T19:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279300#M907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In ArcInfo workstation this was as easy as typing the following at the grid prompt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;correlation grid1 grid2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI - why have we lost functions with ArcGIS?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Nov 2010 15:03:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279300#M907</guid>
      <dc:creator>GuyDuke</dc:creator>
      <dc:date>2010-11-29T15:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279301#M908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the difference between using the above procedure and using band statistics to calculate the correlation between rasters?&amp;nbsp; I am hoping to find the correlations between my environmental variables prior to further analysis in maxent.&amp;nbsp; Any thoughts would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jessica&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 05:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279301#M908</guid>
      <dc:creator>JessicaBerryman</dc:creator>
      <dc:date>2011-03-14T05:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Pearson correlation in raster datasets</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279302#M909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Like Jessica I am also trying to find which of my environmental layers are highly correlated before using them in Maxent. The correlation matrix that it produces has many values outside of the -1 to 1 range, can anyone tell me what the problem is there?&amp;nbsp; (I'm using the worldclim 1-19 layers, 30arc seconds, clipped to Europe).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 00:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/pearson-correlation-in-raster-datasets/m-p/279302#M909</guid>
      <dc:creator>SarahPene</dc:creator>
      <dc:date>2011-12-28T00:21:22Z</dc:date>
    </item>
  </channel>
</rss>

