Last chance! 50% off unlimited learning
Sale ends in
Gres(object, ...)
"ppm"
),
a point pattern (object of class "ppp"
),
a quadrature scheme (object of class "quad"
),
or the value returned by a prGcom
."fv"
),
essentially a data frame of function values.
There is a plot method for this class. See fv.object
. In normal use, object
is a fitted point process model
or a point pattern. Then Gres
first calls Gcom
to compute both the nonparametric estimate of the $G$ function
and its model compensator. Then Gres
computes the
difference between them, which is the residual $G$-function.
Alternatively, object
may be a function value table
(object of class "fv"
) that was returned by
a previous call to Gcom
. Then Gres
computes the
residual from this object.
Gcom
,
Gest
. Alternative functions:
Kres
,
psstA
,
psstG
,
psst
.
Model-fitting:
ppm
.
data(cells)
fit0 <- ppm(cells, ~1) # uniform Poisson
G0 <- Gres(fit0)
plot(G0)
# Hanisch correction estimate
plot(G0, hres ~ r)
# uniform Poisson is clearly not correct
fit1 <- ppm(cells, ~1, Strauss(0.08))
plot(Gres(fit1), hres ~ r)
# fit looks approximately OK; try adjusting interaction distance
plot(Gres(cells, interaction=Strauss(0.12)))
# How to make envelopes
E <- envelope(fit1, Gres, interaction=as.interact(fit1), nsim=39)
plot(E)
# For computational efficiency
Gc <- Gcom(fit1)
G1 <- Gres(Gc)
Run the code above in your browser using DataLab