[R-sig-Geo] test of CSR in 3D
Rolf Turner
r.turner at auckland.ac.nz
Sat May 21 02:51:38 CEST 2011
On 21/05/11 10:11, Hamid Ghorbani wrote:
> Dear list,
> let L be the L function for a point pattern in 3D.
> using spatstat I need a plot of \hat{L(r)} - r vs. r along with the
> corresponding envelopes for a simulated pattern.
>
> The K function have to be estimated for r's in [0,rmax] with "nrval"
> equal to let say 1001 (nraval is the number of values of r for which
> K3(r) will be estimated).
>
> I use the following codes. using the ccommand env$r shows the rmax and
> nrval and has not taken in to account. Furthermore the y axis is
> \hat{L(r)} not \hat{L(r)} - r.
>
> Any correction please. many thanks in advance.
>
> Hamid Gh.
> =============
> lambda<-470
> r0<-73
> X<-runifpoint3(lambda, domain = box3(c(150,350),c(150,350),c(300,400)))
>
> env = envelope.pp3(X, fun = K3est,r=seq(0,r0, 1001), nsim = 99,
> correction = "iso",transform=expression((3*./(4*pi))^(1/3)))
> plot(env)
> env$r
The function K3est() does not have an "r" argument. Note that
the argument "r" to envelope gets passed, as part of the "..."
arguments.
Try
xxx <- K3est(X,rmax=73,nrval=1001)
and look at xxx$r; this might be what you want.
cheers,
Rolf Turner
More information about the R-sig-Geo
mailing list