Hello everyone,
I am trying to add multiple raster layers and multiply them by the coefficients of the equation derived by logistic regression. However, when I do add the rasters, I just get a black raster with 0 pixel values. How can I get a raster with 0 to 1 values?
I am attaching a snapshot of the max and min values of my rasters and also the logistic regression equation. I have tried breaking down the equation and only performing the portion inside the Exp and that seemed to look reasonable but using the Exp function is what causes problems. (By the way, I have changed the raster names properly in raster calculator so this isn't an issue).
Logistic regression equation:
1 / (1 + Exp( - (11.97 - 0.000038 * "pop_centres" - 1.6 * "NDVI_2013" - 0.0053 * "Dem30v3proj" - 0.19 * "Slope30v3" - 0.000015 * "Camps30" - 0.032 * "June_prec" - 3.47 * "june_vappres" - 0.000127 * "EUC_2013")))
You will have to validate your inputs, since I suspect that you are violating one of the conditions.
Exp help topic....
See this as well.......
So to confirm your assertion that the portions look fine, you will have to present the values for the various pieces of the equation as separate arrays summaries to confirm that you aren't going below the threshold, or experiencing other forms of numeric underflow/overflow for the grid type.
You might also try to use another raster type, one that supports more than 32bit.