*Dear Adrian Baddeley* ,
 Thanks for your excellent replies on my questions on "testing for CSR based
on F and G functions" and "quadrat counting"   ! It does works! A little
more question.
      library(spatstat)
     FminG <- function(X, ...) {
        FX <- Fest(X, ...)
        GX <- Gest(X, r=FX$r)
        return(eval.fv(FX - GX))
     }
You use the default value of r. HELP says  First-time  users are strongly
advised not to specify this argument. If i want to specify it , how to
complete it in the above *FminG *functions?

In spatstat version 1.9-3 (to be released shortly), the return value can
also be plotted:
 The plot draws the tile boundaries and displays the counts as text(numerals
in each tile).
This is a good news for me, I hope to use it soon. By the way,Could i use
the results of quadrat counts to compute the Moran's I? HOW?
 Thanks very much!

On 6/21/06, Adrian Baddeley <adrian@maths.uwa.edu.au> wrote:

>
> Zhijie Zhang asked how to test for CSR using the
> max absolute difference between the functions F and G.
>
> A solution has been provided in package 'splancs'.
>
> For comparison, here's how to do this in package 'spatstat',
> illustrated for the 'cells' dataset.
>
>      library(spatstat)
>      FminG <- function(X, ...) {
>         FX <- Fest(X, ...)
>         GX <- Gest(X, r=FX$r)
>         return(eval.fv(FX - GX))
>      }
>      data(cells)
>      E <- envelope(cells, FminG, global=TRUE)
>      plot(E)
>      E
>
> Plotting the envelope E shows that the null hypothesis of CSR is rejected.
> (This plot even shows the correct y-axis label, "F(r) - G(r)",
> automatically).
> Printing the envelope E prints the significance level of the test, etc.
>
> By adding extra arguments to 'envelope' you can change the number of
> simulations (nsim),
> the significance level (nrank/(nsim+1)), the interval of r values over
> which the
> maximum absolute deviation is taken (ginterval) and the method of
> simulating from
> the null hypothesis (simulate).
>
> regards
> Adrian Baddeley
>
>


-- 
Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
School of Public Health
Fudan University
Tel:86-21-54237149

	[[alternative HTML version deleted]]


