[R-sig-Geo] plotting Ripley fonctions
Adrian Baddeley
adrian at maths.uwa.edu.au
Tue Oct 14 07:39:42 CEST 2008
Lassana Toure wrote:
> I need some help for plotting L(r) and Lcross so that I can have my
> confidence interval(CI) parallel to X axis.
> The plot I have obtain so far the graphic is not horizontal, then it
> is difficult to interpret strong the aggregation is or the attraction.
This is a question about the package 'spatstat'.
Presumably you want to plot L(r) - r against r, so that a horizontal
line corresponds to a completely random pattern; and you want the
envelopes to be horizontal as well.
If X is your point pattern, then type
E <- envelope(X, Lest, global=TRUE, nsim=39)
plot(E, . - r ~ r)
This is for L(r) = sqrt(K(r)/pi) where K(r) is Ripley's K-function. To
do the same thing for the cross-type L function of a marked point
pattern, e.g. for the 'amacrine' data:
data(amacrine)
V <- envelope(amacrine, Lcross, i="on", j="off",
global=TRUE, nsim=39)
plot(V, . - r ~ r)
For further information, see the course notes on spatstat which are
available at <www.spatstat.org>.
Please note that simulation envelopes are NOT confidence intervals for
the true value of L(r). They are critical bands for a test of the
hypothesis of a completely random pattern.
Adrian Baddeley
co-author of spatstat
www.spatstat.org
More information about the R-sig-Geo
mailing list