Skip to content
Prev 18931 / 29559 Next

Using pixel image as spatstat's intensity surface

On 24/07/13 07:56, Allar Haav wrote:
This does not make a hell of a lot of sense to me.  Can you make your 
data ("sites" and "model")
available to me to experiment with and see what is going on?

Basically if you think that "model" represents the underlying intensity 
for "sites" then

     X <- rpoispp(model)

should bear at least a *vague* resemblance to "sites".   If you think 
that "model" represents
the reciprocal of the underlying intensity for "sites" then

     recipMod <- eval.im(1/model)
     Y <- rpoispp(recipMod)

should yield a "Y" which bears at least a vague resemblance to "sites".  
If neither of these
apply then it would appear that "model" has nothing to do with the 
intensity underlying sites,
and you shouldn't be using it.  Or perhaps some other transformation of 
"model" is
required.  Perhaps you need to use exp(model)?  This would apply if 
"model" arises from
the *linear* predictor of a loglinear model for the intensity.

     cheers,

         Rolf