1

I have a model from which I am attempting to create a predictive map (in GIS, but I'm aware of some options in R). The response values are constrained to [0,1] using an offset term in the model (see the full model below) and as such, raster values should also have the same constraints.

I believe the syntax in Raster Calculator is correct, but the output values aren't constrained to [0,1]. My guess at the moment is that this is because I scaled the variables around a mean of 0 and standard deviation of 1 prior to model building. Is my best bet of achieving the predictive map to also scale the rasters in GIS or R? If so, how?

Model syntax in Raster Calculator is as follows:

     Ln(57064) + (-0.10872 * "var1"^2)+ (0.02844* "var2"^2)+(-0.03848 * "var3"^2)+ (0.05726*"var4")
     +(0.06462*"var5"^2)+(- 0.42450*"var6"^2)

Edit to clarify the process I used: I created 6 raster layers (things like distance to roads, distance to streams, etc.) in GIS from which I sampled to generate my predictor values. I standardized these predictor values using the parameterization described above. I fit a negative binomial model with these predictors, where frequency of animal use was the response. An offset term (in the syntax above, depicted as ln(total counts)) transformed frequency of use to probability of use. After some model selection, my model generated beta estimates which are standardized and therefore are best interpreted in an odds-ratio context. I'd like to use the model, which I included above, to generate a predictive map of probability of use across my study area.

  • Can you explain what all that means.. in pseudo code preferably. Labels like var1 etc don't help much, are they all rasters? What are their value ranges? – Michael Stimson Jun 12 '15 at 2:41
  • You need a different model. The easy options include modeling a transformation of the predictand, such as its logit, and a generalized linear model (GLM), such as one with a beta response. – whuber Jun 12 '15 at 16:47
  • Thanks for the comments. I've added an edit above that may clarify my issue - I'm not quite sure what you mean by a different model, @whuber. Hopefully my edit will clarify my model. – Beth S. Jun 13 '15 at 15:34
  • Thank you for the clarification. I do not understand the role of your offset: that does not appear to be a valid way to relate frequency to probability. Instead, don't you want to predict the chance that the outcome will be 1 or greater? Regardless, why not just fit the model with the original variable values? – whuber Jun 13 '15 at 16:07
  • @whuber, appreciate the follow up. The offset term scales the response to model relative frequency of use rather than integer counts of use (which is the response when the offset is not included). If you have literature access, see Estimating resource selection with count data (Nielson and Sawyer 2013). In this case, relative freq of use is a proxy for probability of use and is therefore constrained between [0,1]. I standardized the variables because otherwise the values were too large numerically and the model would not converge. – Beth S. Jun 13 '15 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.