On 08/10/11 02:22, Robin W Hunnewell wrote:
> Dear all,
>
> I'm working with function 'ppm' in pkg: spatstat; the aim is to fit 
> IPP (inhomogeneous pt process) model to a point pattern.
> It's worked well before, but recently have tried it with an additional 
> covariate -- spatially referenced and stored as an image object.
> When I go to run the inhom point process model, the following warning appears. 'B10' is my point pattern object, 'flightPix' is the spatial covariate image object.
> >  Q<- ppm(B10, ~flights, covariates = list(flights = flightPix))
> Warning message:
> Values of the covariate ‘flights’ were NA or undefined at 0.08% (2 out of 2493) of the quadrature points. Occurred while executing: ppm(B10, ~flights, covariates = list(flights = flightPix))
> # then when I look at summary output for the IPP model, it says:
> Problem:
>   Values of the covariate ‘flights’ were NA or undefined at 0.08% (2 out of 2493) of the quadrature points
> Is there a way solve this problem? Thanks for any help!!

Uh, well, it's saying that two of the quadrature points are not inside 
the region determined by
the covariate image "flightPix".  There is probably a slight 
misalignment of the covariate image
and the window of the point pattern.  It sometimes happens that the 
corners of a rectangular
window (which are always included amongst the quadrature points) fall 
outside of an image
when you would think that they shouldn't.  However this usually results 
in all four corner points
falling outside, so you get 4 NAs rather than 2.  So I don't know what's 
going on in your case.

What to *do* about it is kind of hard to say; it depends to some extent 
as to how the covariate
image was obtained or constructed.

If you would like to make the data available  (e.g. save "B10" and 
"flightPix" in a *.rda
file and attach that to an email to me) I will have a look and see what 
I can do to tidy up the
problem.  Some more detail about the nature of the pattern and the 
covariate image might
be helpful in this case.

There probably *isn't* really much of a problem anyway.  Missing two 
quadrature points out
of 2493 isn't likely to have much impact on the evaluation of the 
likelihood and hence little
impact on the parameter estimates.

     cheers,

         Rolf Turner

	[[alternative HTML version deleted]]

