Skip to content

(no subject)

1 message · Adrian Baddeley

#
Hamid Ghorbani <hhamidghorbani at gmail.com> writes:
You want to calculate the maximum deviation M = \sup_r |\pi r^2 - \hat K(r)|. 
In the spatstat package \hat K(r) is evaluated at a regular grid of 
values of 'r'. If the spacing between two successive r values is r_{i+1} - r_i = s, then the discrete approximation M* = \max_i | \pi r_i^2 - \hat K(r_i)| satisfies 
|M - M*| \le \pi (R^2 - (R-s)^2) = \pi (2 R s + s^2) where R is the maximum value of r over which the supremum is taken. One can thus control the accuracy of the computation by selecting a sufficiently fine grid spacing 's'. 

Example
    require(spatstat)
    data(cells)
    K <- Kest(cells, r = seq(0, 0.25, by=1e-06))
    Mstar <- with(K, max(iso - theo))
    maxerr <- pi * (2 * 0.25 * 1e-06 + 1e-12)


Prof Adrian Baddeley (UWA/CSIRO)
CSIRO Mathematics, Informatics & Statistics
Leeuwin Centre, 65 Brockway Road, Floreat WA 6014, Australia
Tel: 08 9333 6177 | Fax: 08 9333 6121 | Mob: 0410 447 821