Dear Adrian and Rolf, Thank you for your comments. I am considering your comments to understand them. I will send such questions to the package authors.
Regards, Hiroshi Saito On Mon, 11 Feb 2013 13:56:42 +0800 <adrian.badde...@csiro.au> wrote: > > On 02/08/2013 01:48 PM, Hiroshi Saito wrote: > >>> 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. > > This is a question about the 'spatstat' package. > Questions about this package should preferably be sent to the package authors. > > >>> 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. > > Yes, it does. > > >>> 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. > > That is correct. > > In general, the Kolmogorov-Smirnov test compares the observed distribution of > some numerical variable with the expected or theoretical distribution of the > same variable. > > To apply the K-S test to spatial data, each point in the data and each > spatial location in the window must be assigned a numerical value. In > 'kstest' this is specified by the argument 'covariate'. > > If you specify covariate="x" then the numerical value assigned to each point > is its x-coordinate. Thus, effectively the data points are projected onto the > x-axis. Then the observed distribution of these x-coordinates is compared > with the theoretical distribution of the x-coordinate according to the fitted > model. > > Another possible choice would be covariate = function(x,y){ 2 * x + y}. > More realistically, we would often have some other data in the form of a > pixel image Z, > and we could then use covariate=Z. > > The choice of covariate is arbitrary. Different choices of covariate lead to > different tests, each of which is equally valid, and all of which have the > same significance level (probability of type I error), but which will have > different power (probability of type II error) depending on the true origin > of the data. > > The appropriate choice of covariate depends on the *suspected* type of > deviation from the null hypothesis. > > regards > Adrian Baddeley > > Prof Adrian Baddeley FAA > School of Earth and Environment > University of Western Australia > 35 Stirling Hwy, Crawley WA 6009, Australia > and > CSIRO Mathematics, Informatics & Statistics > Leeuwin Centre, 65 Brockway Road, Floreat WA 6014, Australia > Tel: 08 9333 6177 | Fax: 08 9333 6121 | Skype: adrian.baddeley ************************* Hiroshi Saito: E-MAIL: saito.hiro...@lab.ntt.co.jp http://www9.plala.or.jp/hslab/ PHONE: +81 422 59 4300 FAX: +81 422 59 6364 _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo