

A simple MonteCarlo procedure:

#sample data:
X <- rpoispp3(50)


n <- dim(X$data)[1]
volume <- volume.box3(as.box3(X))

lambda <- n / volume


# observed isotropic  corrected K
kobs <- K3est(X, rmax=1,nrval=101)$iso

#99 simulated CSR patterns

Xsim<- vector("list", 99)
for  (i in 1: 99){
    Xsim[[i]] <- rpoispp3(lambda, domain = as.box3(X))
}

#simulated K functions
  ksim <- sapply(Xsim, function(x) K3est(x, rmax=1,nrval=101)$iso)

# "visual CSR test"
plot(0:100, kobs, xlab="r", ylab="K3est(r)", type="l")
matplot(0:100,t(apply(ksim,1,range)), lty=2,col=2, type="l", add=T)

# another one:
  plot(0:100, (3*kobs/(4*pi*(0:100)^3)), xlab="r", ylab="L3est(r)", type="l")
  matplot(0:100,(3*t(apply(ksim,1,range))/(4*pi*(0:100)^3)), 
lty=2,col=2, type="l", add=T)

HTH,

Marcelino
















At 13:29 15/03/2010, tobias.verbeke@openanalytics.eu wrote:

>Dear list,
>
>Is there any functionality available to test
>CSR for a three-dimensional point pattern ?
>
>I am aware there is basic infrastructure for 3D
>point patterns in spatstat
>
> > methods(class = "pp3")
>[1] crossdist.pp3  nnclean.pp3    nndist.pp3     nnwhich.pp3
>pairdist.pp3
>[6] plot.pp3       print.pp3      summary.pp3    unitname<-.pp3
>unitname.pp3
>
>(as well as through rpoispp3, K3est, F3est, G3est), but would appreciate
>any hints on possibilities to combine these building blocks
>into a test for CSR.
>
>Pointers to asymptotic results will be appreciated by my computer,
>pointers to simple Monte Carlo procedures will be appreciated by
>myself..
>
>Many thanks in advance,
>Tobias
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo@stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo

________________________________

Marcelino de la Cruz Rot

Departamento de  Biología Vegetal
E.U.T.I. Agrícola
Universidad Politécnica de Madrid
28040-Madrid
Tel.: 91 336 54 35
Fax: 91 336 56 56
marcelino.delacruz@upm.es
_________________________________ 
	[[alternative HTML version deleted]]

