[R] Rhelp: Need help interpreting plots in spatstat

About this list Date view Thread view Subject view Author view Attachment view

From: Lisa Schweitzer (lschwei@ucla.edu)
Date: Sun 30 May 2004 - 02:26:23 EST

Message-id: <20040529092623250975.GyazMail.lschwei@ucla.edu>

Hello everybody--

I have been playing with my data in spatstat, and what I'd like to
present is a basic exploratory spatial analysis. I have used the
following code, using a ppp.object called tsdspoints. The code
develops the simulations and the envelopes I want, but I don't
understand my first plot here, the [tsds.ghat.short$r,
tsds.ghat.short$raw]...I cobbled together this code from some class
examples used by a prof of mine, and I don't really know how to
interpret what is going on. The subsequent lines, I'm pretty sure,
represent the empirical Ghat and the simulation envelope...but that
first plot stumps me.

You can see a pdf of the resulting plot if you download it from my
website : www.bol.ucla.edu/~lschwei/sample.pdf WARNING: this is
immediate download.

THE CODE: ######

ghat.env <- function(n, s, r, win=owin(myOwin){
hold <- matrix(0, s, length(r))
for(i in 1:s){
hold[i,] <- Gest(runifpoint(n, win=myOwin), r=r)$raw
mn <- apply(hold, 2, mean)
Up <- apply(hold, 2, max)
Down <- apply(hold, 2, min)
return(data.frame(mn, Up, Down))
tsds.ghat <- Gest(tsdspoints)
tsds.ghat.short <- tsds.ghat[tsds.ghat$r <= .15, ]
tsds.cdf <- 1-exp(-40*pi*(tsds.ghat.short$r^2))
plot(tsds.ghat.short$r, tsds.ghat.short$raw, xlab="Distance (degrees)",
ylab="Ghat", main=" Transport, Storage, and Disposal sites (TSDs)")
lines(tsds.ghat.short$r, tsds.cdf)
tsds.env <- ghat.env(n=40, s=100, r=tsds.ghat$r)
tsds.env.short <- tsds.env[tsds.ghat$r <= .15, ]
lines(tsds.ghat.short$r, tsds.env.short$Up, lty=5)
lines(tsds.ghat.short$r, tsds.env.short$Down, lty=5)

Many Thanks,

who was working on her stinking dissertation while everybody else was
learning cool things in Vienna.

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:14 EST