<?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 Re: Linear regression in Raster Calculator in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517292#M7443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anna,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to use the Lookup() tool to get at raster attributes, and "Con" to pick your coefficient from the vegstruct grid; this would be something along the lines of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
293.1 + (-15.3 * Lookup("soil type","HSeu")) + \
&amp;nbsp; (-0.6 * Lookup("soil type","CMcr")) + \
&amp;nbsp; (Con("vegstruct" == 1, -1.5, Con("vegstruct" == 2, -2.7)))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:34:00 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-11T22:34:00Z</dc:date>
    <item>
      <title>Linear regression in Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517291#M7442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use a linear regression equation to compute a grid of estimated values in ArcView 9.3.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; The coefficients have already been obtained and I only need to put them into Raster Calculator. However, I am having troubles with the syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, the data table of my layer "soil type" contains the fields "values", "count" and "wrbuf", the latter field containing the variables of the linear regression. The variables are called for example "HSeu" or "CMcr". &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have another layer with data on vegetation structure containing fields "values" and "count". Here, the field "values" contains the variables which are called e.g. "1" or "2". These numbers encode for a type of vegetation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The regression should look like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output = 293.1 + (-15.3 * "HSeu") + (-0.6 * "CMcr") + (-1.5 * "1") + (-2.7 * "2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the correct syntax for this in the Raster Calculator? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anna&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 14:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517291#M7442</guid>
      <dc:creator>AnnaReye</dc:creator>
      <dc:date>2013-06-03T14:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Linear regression in Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517292#M7443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anna,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to use the Lookup() tool to get at raster attributes, and "Con" to pick your coefficient from the vegstruct grid; this would be something along the lines of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
293.1 + (-15.3 * Lookup("soil type","HSeu")) + \
&amp;nbsp; (-0.6 * Lookup("soil type","CMcr")) + \
&amp;nbsp; (Con("vegstruct" == 1, -1.5, Con("vegstruct" == 2, -2.7)))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:34:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517292#M7443</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T22:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Linear regression in Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517293#M7444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Curtis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your reply. Unfortunately, the lookup tool does not work, I receive following error messages:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Syntax error at or near symbol ,.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Syntax error in parsing grid expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to solve my problem, I have now created individual raster files per variable, which I can multiply with my coefficient to calculate my regression. This works quite nicely (I don't get an error message), however, the created output layer cannot be visualized on the map (when activated). I have tried "zoom to layer" and simplifying the equation, but the problem stays the same. Opening and closing of the project and program does not help either...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have an idea how to solve this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 05:53:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517293#M7444</guid>
      <dc:creator>AnnaReye</dc:creator>
      <dc:date>2013-06-06T05:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Linear regression in Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517294#M7445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Unfortunately, the lookup tool does not work, I receive following error messages:&lt;BR /&gt;&lt;BR /&gt;Syntax error at or near symbol ,.&lt;BR /&gt;Syntax error in parsing grid expression.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share your expression that does not work? I do not see ",." anywhere in the expression I posted first. My guess is you may have some model variables that are misspelled or tools that incorrectly capitalized.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 16:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/linear-regression-in-raster-calculator/m-p/517294#M7445</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-06-06T16:36:21Z</dc:date>
    </item>
  </channel>
</rss>

