Computes the fitted intensity of a locally-fitted Poisson point process model, or the fitted intensity, trend or conditional intensity of a locally-fitted Gibbs point process model.
# S3 method for locppm
fitted(object, ...,
type = c("cif", "trend", "intensity"),
new.coef=NULL)# S3 method for locppm
predict(object, ...,
type = c("cif", "trend", "intensity"),
locations=NULL, new.coef=NULL)
For fitted.locppm
, a numeric vector.
For predict.locppm
, an object of class "ssf"
as described in ssf
.
A locally-fitted Poisson or Gibbs point process model (object of class
"locppm"
).
Currently ignored.
New vector or matrix of values for the model coefficients.
Point pattern of locations where prediction should be computed.
Character string (partially matched) specifying the type of
predicted value: the conditional intensity "cif"
(the
default), or the first order trend, or the intensity.
For Poisson models all three options are equivalent.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
These are methods for the generic functions
fitted
and
predict
for the class "locppm"
of locally-fitted Gibbs point process
models.
The fitted
method computes,
for each quadrature point v
(or in general, at each point v
where a local model was fitted),
the intensity of the locally-fitted model at v
.
The result is a numeric vector.
The predict
computes the fitted intensity at any specified
set of locations
, and returns the result as an ssf
object.
Baddeley, A. (2017) Local composite likelihood
Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press.
locppm
fit <- locppm(cells, sigma=0.1, use.fft=TRUE)
lam <- predict(fit)
Run the code above in your browser using DataLab