AnsweredAssumed Answered

# Needing help with Exp() raster calculation (logistic regression)

Question asked by rgdrum on Jul 11, 2014
Latest reply on Oct 9, 2017 by Dan_Patterson

This is driving me mad. Thanks in advance for any help...

I am attempting to run a wildlife habitat logistic regression (occupancy) model. Every time I run this raster calculation, I am getting a grid of all zeros.

To identify where the problem lies, I attempted to run the equation in pieces and each component works and produces a reasonable result, but when I run as a whole (or even half of the equation, including the Exp()) I get all zeros.

The logistic regression equation I'm trying to run in raster calculator is as follows:

Exp(-4.3302 + ("twozone" * 1.8943) + ("cbd_m19" * 0.4387) + ("tpa_sd19" * -0.6858) + ("cbh_m19" * 4.4809) + ("cbh2_m19" * -1.4897) + ("aspsum1900std" * 0.5847) + ("XXXstd" * 0.6900) + ("YYYstd" * 1.3998) + ("xstd_xstd" * -0.6346) + ("ystd_ystd" * -0.04634) + ("xstd_ystd" * -0.6392)) / (1 + Exp(-4.3302 + ("twozone" * 1.8943) + ("cbd_m19" * 0.4387) + ("tpa_sd19" * -0.6858) + ("cbh_m19" * 4.4809) + ("cbh2_m19" * -1.4897) + ("aspsum1900std" * 0.5847) + ("XXXstd" * 0.6900) + ("YYYstd" * 1.3998) + ("xstd_xstd" * -0.6346) + ("ystd_ystd" * -0.04634) + ("xstd_ystd" * -0.6392)))

The first part of the equation, as follows, runs fine and produces a reasonable grid with a range of values

(-4.3302 + ("twozone" * 1.8943) + ("cbd_m19" * 0.4387) + ("tpa_sd19" * -0.6858) + ("cbh_m19" * 4.4809) + ("cbh2_m19" * -1.4897) + ("aspsum1900std" * 0.5847) + ("XXXstd" * 0.6900) + ("YYYstd" * 1.3998) + ("xstd_xstd" * -0.6346) + ("ystd_ystd" * -0.04634) + ("xstd_ystd" * -0.6392))

But as soon as I add Exp() to encompass this, as follows, I get a grid of all zeros, which doesn't make sense:

Exp((-4.3302 + ("twozone" * 1.8943) + ("cbd_m19" * 0.4387) + ("tpa_sd19" * -0.6858) + ("cbh_m19" * 4.4809) + ("cbh2_m19" * -1.4897) + ("aspsum1900std" * 0.5847) + ("XXXstd" * 0.6900) + ("YYYstd" * 1.3998) + ("xstd_xstd" * -0.6346) + ("ystd_ystd" * -0.04634) + ("xstd_ystd" * -0.6392)))

I tried as a python script as well, with the same result. I've run a lot of these kinds of models and have never had this problem. And the resulting grid is indeed a floating point grid. I am running ArcGIS 10.1.

Thanks for any help.