[R] spatstat output

Rolf Turner rolf.turner at xtra.co.nz
Sun Jul 7 13:05:28 CEST 2013


On 07/07/13 22:12, catalin roibu wrote:
> Dear R users,
> Is there a possibility to extract only the r, CI's envelope and L function
> from the output of spatstat?
> I use this code
> E <- alltypes(df1, Kest, nsim = 100, envelope =
> TRUE,savepatterns=TRUE,correction="isotropic")
> And second question, is there a possibility to modify the margin of plot in
> spatstat?
>
> plot(E, sqrt(./pi) - r ~ r, ylab = "L(r)-r",main=NULL,sub=NULL,las=1)
>
> Thank you very much for your help!
(1) This is a question about the spatstat package and as such should be
in the first instance directed to the authors of this package.

(2) Your example is *not reproducible* since we have no access to "df1".

(3) Your use of the expression "CI's envelope" indicates that you are 
confused.
The abbreviation "CI" would appear to denote "confidence interval". The 
envelopes
do ***NOT*** consist of confidence intervals.  They are ***critical 
envelopes***.
(Repeat after me, 50 times: "Critical envelope, critical envelope, 
.....").   See the help
for envelope().

(4)  The use of nsim=100, while not incorrect, is bizarre.  The 
envelopes yield
p-values equal to fractions whose denominator is (nsim+1).  Hence nsim=99
(the default) is usually a much better choice than nsim=100.

(5) The object E returned by your code is of class "fasp" (function 
array for
spatial processes).  It is thus a list whose first entry is names 
"fns".  In turn
"fns" is a list whose entries correspond to the marks of the pattern to 
which
you applied alltypes().  Each entry is an object of class "fv".  See the 
help for
fv.object.  If you examine the names of these objects --- which are data 
frames
with extra attributes --- you should easily be able to see how to 
extract the
items that you desire.

(6) In respect of changing the margins, see the help for plot.fasp. Does
the argument mar.panel do what you want?

     cheers,

         Rolf Turner



More information about the R-help mailing list