[GIS] Raster Calculator making incorrect calculations in ArcGIS Desktop

arcgis-10.2arcgis-desktopraster-calculatorspatial-analyst

I am trying to use raster calculator (ArcMap 10.2.2.3552) to apply a poisson generalized linear model to estimate species abundances based on elevation. The outputs don't make any sense to me, and I'm hoping someone can clarify why.

The best fit model (generated elsewhere) is:

Exp( 3.394 + ( 4.717 * "elev" ) + ( -2.602 * ("elev" ^ 2) ) )

Input raster below:

Raster Calc inputs

The output, however, doesn't reflect the math I input, and I am wondering if I have screwed up the syntax, or am missing something basic about raster calculator (which works fine for other models I have used on this dataset). The "elevmllw" raster ranges from -84 to +5 in values (meters) and the output ranges from 0 (which is correct) to 3.49972e+011 (I'm not sure where that number comes from, solving my model equation for that solution gives an imaginary number).

Output:

Output Raster (note high/low values)

When trying to figure out what was going on, I poked around noticed all the values made no sense. Using identify, it's clear that the calculated values for given cells (from "poisson") do not align with what I am trying to calculate for the elevation value from that cell, so it seems like I must be missing something about how to specify this equation.

enter image description here

The calculation runs without any error messages and the environments are shown below (sorry I'm not sure which are most helpful in troubleshooting, so I showed them all)enter image description here

Best Answer

Exp( 3.394 + ( 4.717 * "elev" ) + ( -2.602 * ("elev" ^ 2) ) )

In Raster Calculator syntax, the '^' operator is for 'Boolean XOr', not 'raise to power of' (see Raster Calculator operators here). Instead, you could use:

Exp( 3.394 + ( 4.717 * "elev" ) + ( -2.602 * ("elev" ** 2) ) )

or

Exp( 3.394 + ( 4.717 * "elev" ) + ( -2.602 * ("elev" * "elev") ) )

or

Exp( 3.394 + ( 4.717 * "elev" ) + ( -2.602 * (Power("elev",2)) ) )