"fasp"
) amenable to plotting
by plot.fasp()
.alltypes(pp, fun="K",dataname=NULL,verb=FALSE)
"ppp"
.
If the pattern is not marked, the resulting ``array'' is
$1 \times 1$."F"
,
"G"
, "J"
, "K"
.plot.fasp()
in forming the title "fasp"
,
see fasp.object
). This can be plotted
using plot.fasp
. If fun="F"
,
the function array has dimensions $m \times 1$
where $m$ is the number of different marks in the point pattern.
The entry at position [i,1]
in this array
is the result of applying Fest
to the
points of type i
only.
If fun
is "G"
, "J"
or "K"
,
the function array has dimensions $m \times m$.
The [i,j]
entry of the function array
(for $i \neq j$) is the
result of applying the function Gcross
,
Jcross
or Kcross
to
the pair of types (i,j)
. The diagonal
[i,i]
entry of the function array is the result of
applying the univariate function Gest
,
Jest
or Kest
to the
points of type i
only.
Each function entry fns[[i]]
retains the format
of the output of the relevant estimating routine
Fest
, Gest
, Jest
,
Kest
, Gcross
, Jcross
, or Kcross
.
The default formulae for plotting these functions are
cbind(km,theo) ~ r
for F, G, and J, and
cbind(trans,theo) ~ r
for K.
fun="F"
then this routine
calculates, for each possible type $i$,
an estimate of the Empty Space Function $F_i(r)$ of
$X_i$.
If fun
is "G"
, "J"
or "K"
,
the routine calculates, for each pair of types $(i,j)$,
an estimate of the cross-type function
$G_{ij}(r)$,
$J_{ij}(r)$ or
$K_{ij}(r)$ respectively describing the
dependence between
$X_i$ and $X_j$. The real work is done by the functions Fest
, Gest
,
Kest
, Jest
,
Gcross
, Kcross
, and Jcross
.
One of the first four functions (according to
fun
) is invoked if the two marks under consideration are
equal. The latter three are invoked if the marks are distinct.
(There is no Fcross
; for the empty space function $F(r)$
there is no cross-type version.)
plot.fasp
,
fasp.object
,
allstats
,
Fest
,
Gest
,
Jest
,
Kest
,
Gcross
,
Jcross
,
Kcross
library(spatstat)
# bramblecanes (3 marks).
data(bramblecanes)
X.F <- alltypes(bramblecanes,fun="F",verb=TRUE)
plot(X.F)
X.G <- alltypes(bramblecanes,fun="G",verb=TRUE)
X.J <- alltypes(bramblecanes,fun="J",verb=TRUE)
X.K <- alltypes(bramblecanes,fun="K",verb=TRUE)
<testonly># smaller dataset
bram <- bramblecanes[seq(1, bramblecanes$n, by=20), ]
X.F <- alltypes(bram,fun="F",verb=TRUE)
X.G <- alltypes(bram,fun="G",verb=TRUE)
X.J <- alltypes(bram,fun="J",verb=TRUE)
X.K <- alltypes(bram,fun="K",verb=TRUE)</testonly>
# Swedishpines (unmarked).
data(swedishpines)
X.F <- alltypes(swedishpines,fun="F")
X.G <- alltypes(swedishpines,fun="G")
X.J <- alltypes(swedishpines,fun="J")
X.K <- alltypes(swedishpines,fun="K")
# simulated data
pp <- runifpoint(350, owin(c(0,1),c(0,1)))
pp$marks <- factor(c(rep(1,50),rep(2,100),rep(3,200)))
X.F <- alltypes(pp,fun="F",verb=TRUE,dataname="Fake Data")
X.G <- alltypes(pp,fun="G",verb=TRUE,dataname="Fake Data")
X.J <- alltypes(pp,fun="J",verb=TRUE,dataname="Fake Data")
X.K <- alltypes(pp,fun="K",verb=TRUE,dataname="Fake Data")
# A setting where you might REALLY want to use dataname:
xxx <- alltypes(ppp(Melvin$x,Melvin$y,
window=as.owin(c(5,20,15,50)),marks=clyde),
fun="F",verb=TRUE,dataname="Melvin")
Run the code above in your browser using DataLab