[R-sig-Geo] spatstat kstest

Hiroshi Saito saito.hiroshi at lab.ntt.co.jp
Fri Feb 8 04:00:13 CET 2013


Dear Rolf,

Unfortunately, the data I have is under nondisclosure agreement.
Therefore, I hesitate to offer.

Let X={(x1,y1),(x2,y2),..} be the data set, and X_x={x1,x2,...} be its
projection to the x-axis.
Try, for example, 
fit <- ppm(X, ~x+y+I(x^2)+I(y^2), Poisson())
(that is, the inhomogeneous Poisson process with the intensity
\lambda(x,y)=exp(a+bx+cy+dx^2+ey^2))
and test
kstest(fit, covariate="x")

In my understanding, this is the KS-test whether X_x and the
inhomogeneous Poisson process with the intensity \lambda(x)=\int
\lambda(x,y)dy.
Am I wrong ?

What I would like to say is that kstest is not a function of the test of
the agreement between the model defined over (x,y) and the data set on
the plane, but the function of the test of the agreement between the
projected model and the projected model on a one-dimensional space.
Am I wrong?

Even so, you may have a good way to use kstest to test the two
dimensional data by, for example, appropriately setting the covariate in
kstest.
If so, please give me some pieces of advice.

Regards,
Hiroshi Saito

On Fri, 08 Feb 2013 13:51:55 +1300
Rolf Turner <r.turner at auckland.ac.nz> wrote:

> 
> Can you please give a *reproducible* example (including code and data,
> possibly provided using dput()) illustrating just exactly what is the 
> problem
> that you are trying to solve?
> 
>      cheers,
> 
>          Rolf Turner
> 
> On 02/08/2013 01:48 PM, Hiroshi Saito wrote:
> > Dear sir,
> >
> > I am analyzing a spatial point data set.
> > I would like to test how fit the model fitted by ppm is.
> > For this objective, I used kstest.
> > Unfortunately, however, I am not sure that the test actually tests the
> > fit of the model for the data set on the two dimensional space.
> > For example, if I set the covariate = x, it means (in my understanding)
> > that the projection of the data set to the x-axis is tested.
> > Is it possible to test the fit by appropriately setting the covariate?
> >
> > Please give me some pieces of advice how I test the fit.
> > I need to test the method for the model including inhomogeneous Poisson
> > model.
> > If there is no appropriate method, I would like to develop.

*************************
Hiroshi Saito:
E-MAIL: saito.hiroshi at lab.ntt.co.jp
http://www9.plala.or.jp/hslab/
PHONE: +81 422 59 4300
FAX: +81 422 59 6364



More information about the R-sig-Geo mailing list