<?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 Correlation multiple fields raster in Spatial Statistics Questions</title>
    <link>https://community.esri.com/t5/spatial-statistics-questions/correlation-multiple-fields-raster/m-p/120765#M429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a raster with many fields (result of combination of various raster). I want to analyse correlation among fields, but rows refer to different number of pixels. So if i export the table to excell, i couldnt analyze it without bias to most repeated pixels. I created a point layer and tried to extract values to points, but I get an error all the time. Is there other method to export a raster table in which every pixel becomes a different row?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 17:44:54 GMT</pubDate>
    <dc:creator>IgnacioPalomo</dc:creator>
    <dc:date>2012-03-19T17:44:54Z</dc:date>
    <item>
      <title>Correlation multiple fields raster</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/correlation-multiple-fields-raster/m-p/120765#M429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a raster with many fields (result of combination of various raster). I want to analyse correlation among fields, but rows refer to different number of pixels. So if i export the table to excell, i couldnt analyze it without bias to most repeated pixels. I created a point layer and tried to extract values to points, but I get an error all the time. Is there other method to export a raster table in which every pixel becomes a different row?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 17:44:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/correlation-multiple-fields-raster/m-p/120765#M429</guid>
      <dc:creator>IgnacioPalomo</dc:creator>
      <dc:date>2012-03-19T17:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation multiple fields raster</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/correlation-multiple-fields-raster/m-p/120766#M430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Python numeric package NumPy has a good correlation function, and you can also easily convert raster to NumPy arrays in ArcGIS 10.0. Here is a short script that I've used before, to calculate the correlation coefficient between two rasters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import numpy
array1 = arcpy.RasterToNumPyArray("per_under30.tif")
array2 = arcpy.RasterToNumPyArray("per_renter.tif")
print numpy.corrcoef(array1.ravel(), array2.ravel())
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will just need to split your single raster with multiple attributes into multiple rasters. This will return a correlation matrix like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;[[ 1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.28250181]&lt;BR /&gt; [ 0.28250181&amp;nbsp; 1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...so between my two variables there is a 0.28xxx correlation coefficient (between the same variable of course the correlation coefficient is 1). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's some more information on the NumPy corrcoef function: &lt;/SPAN&gt;&lt;A href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.corrcoef.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://docs.scipy.org/doc/numpy/reference/generated/numpy.corrcoef.html&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Drew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/correlation-multiple-fields-raster/m-p/120766#M430</guid>
      <dc:creator>DrewFlater</dc:creator>
      <dc:date>2021-12-11T07:00:59Z</dc:date>
    </item>
  </channel>
</rss>

