library(spatial) pines<-ppinit("pines.dat") plot(pines, xlim=c(0,10), ylim=c(0,10), xlab="x-coordinate", ylab="y-coordinate") title("Pines Data Set, N=72") plot( Kfn(pines, 5),type="s", xlab="Distance", ylab="L(t)") lims<-Kenvl(5, 100, Psim(72)) lines(lims$x, lims$l, lty=2) lines(lims$x, lims$u, lty=2) lines(lims$x, lims$a, lty=3) title("K-Function for the Pines Data Set - Upper and Lower Envelopes Based on a Poisson Process") plot(Kfn(pines, 1.5), type="s", xlab="Distance", ylab="L(t)") lims<-Kenvl(1.5, 100, Strauss(72,0.2,0.7)) lines(lims$x, lims$l, lty=2) lines(lims$x, lims$u, lty=2) lines(lims$x, lims$a, lty=3) title("K-Function for the Pines Data Set -Upper and Lower Envelopes Based on a Strauss Process") # Use pplik to estimate the Strauss parameter c: cc<-pplik(pines,0.7) cc plot(Kfn( pines,1.5), type="s", xlab="Distance", ylab="L(t)") lims<-Kenvl(1.5, 100, Strauss(72,cc,0.7)) lines(lims$x, lims$l, lty=2) lines(lims$x, lims$u, lty=2) lines(lims$x, lims$a, lty=3) title("K-Function for the Pines Data Set -Upper and Lower Envelopes Based on a Strauss Process")