kppm(X, ...)
"kppm"(X, clusters = c("Thomas","MatClust","Cauchy","VarGamma","LGCP"), ..., data=NULL)
"kppm"(X, trend = ~1, clusters = c("Thomas","MatClust","Cauchy","VarGamma","LGCP"), data = NULL, ..., covariates=data, method = c("mincon", "clik2", "palm"), improve.type = c("none", "clik1", "wclik1", "quasi"), improve.args = list(), weightfun=NULL, control=list(), algorithm="Nelder-Mead", statistic="K", statargs=list(), rmax = NULL, covfunargs=NULL, use.gam=FALSE, nd=NULL, eps=NULL)
"kppm"(X, trend = ~1, clusters = c("Thomas","MatClust","Cauchy","VarGamma","LGCP"), data = NULL, ..., covariates=data, method = c("mincon", "clik2", "palm"), improve.type = c("none", "clik1", "wclik1", "quasi"), improve.args = list(), weightfun=NULL, control=list(), algorithm="Nelder-Mead", statistic="K", statargs=list(), rmax = NULL, covfunargs=NULL, use.gam=FALSE, nd=NULL, eps=NULL)
"ppp"
or
"quad"
) to which the model should be fitted, or a
formula
in the R language defining the model. See Details.
"Thomas"
, "MatClust"
,
"Cauchy"
, "VarGamma"
and "LGCP"
.
"mincon"
for minimum contrast,
"clik2"
for second order composite likelihood,
or "palm"
for Palm likelihood.
Partially matched.
improve.type = "none"
, is to use this initial estimate.
Otherwise, the trend estimate is
updated by improve.kppm
, using information
about the pair correlation function.
Options are "clik1"
(first order composite likelihood, essentially equivalent to "none"
),
"wclik1"
(weighted first order composite likelihood) and
"quasi"
(quasi likelihood).
improve.kppm
when
improve.type != "none"
. See Details.
function
in the R language.
See Details.
optim
.
"K"
or "pcf"
.
statistic
. See Details.
ppm
when fitting the intensity.
"kppm"
representing the fitted model.
There are methods for printing, plotting, predicting, simulating
and updating objects of this class.
ppm.ppp
for a list of common error messages
and warnings originating from the first stage of model-fitting.X
. The model may be either a Neyman-Scott cluster process
or another Cox process.
The type of model is determined by the argument clusters
.
Currently the options
are clusters="Thomas"
for the Thomas process,
clusters="MatClust"
for the Matern cluster process,
clusters="Cauchy"
for the Neyman-Scott cluster process
with Cauchy kernel,
clusters="VarGamma"
for the Neyman-Scott cluster process
with Variance Gamma kernel (requires an additional argument nu
to be passed through the dots; see rVarGamma
for details),
and clusters="LGCP"
for the log-Gaussian Cox process (may
require additional arguments passed through ...
; see
rLGCP
for details on argument names).
The first four models are Neyman-Scott cluster processes.
The algorithm first estimates the intensity function
of the point process using ppm
.
The argument X
may be a point pattern
(object of class "ppp"
) or a quadrature scheme
(object of class "quad"
). The intensity is specified by
the trend
argument.
If the trend formula is ~1
(the default)
then the model is homogeneous. The algorithm begins by
estimating the intensity as the number of points divided by
the area of the window.
Otherwise, the model is inhomogeneous.
The algorithm begins by fitting a Poisson process with log intensity
of the form specified by the formula trend
.
(See ppm
for further explanation).
The argument X
may also be a formula
in the
R language. The right hand side of the formula gives the
trend
as described above. The left hand side of the formula
gives the point pattern dataset to which the model should be fitted.
If improve.type="none"
this is the final estimate of the
intensity. Otherwise, the intensity estimate is updated, as explained in
improve.kppm
. Additional arguments to
improve.kppm
are passed as a named list in
improve.args
.
The clustering parameters of the model are then fitted
either by minimum contrast estimation, or by maximum
composite likelihood.
In all three methods, the optimisation is performed by the generic
optimisation algorithm optim
.
The behaviour of this algorithm can be modified using the
argument control
.
Useful control arguments include
trace
, maxit
and abstol
(documented in the help for optim
).
Fitting the LGCP model requires the RandomFields package except in the default case where the exponential covariance is assumed.
Jalilian, A., Guan, Y. and Waagepetersen, R. (2012) Decomposition of variance for spatial Cox processes. Scandinavian Journal of Statistics, in press.
Tanaka, U. and Ogata, Y. and Stoyan, D. (2008) Parameter estimation and model selection for Neyman-Scott point processes. Biometrical Journal 50, 43--57.
Waagepetersen, R. (2007) An estimating function approach to inference for inhomogeneous Neyman-Scott processes. Biometrics 63, 252--258.
kppm
objects:
plot.kppm
,
fitted.kppm
,
predict.kppm
,
simulate.kppm
,
update.kppm
,
vcov.kppm
,
methods.kppm
,
as.ppm.kppm
,
Kmodel.kppm
,
pcfmodel.kppm
. Minimum contrast fitting algorithm:
mincontrast
.
Alternative fitting algorithms:
thomas.estK
,
matclust.estK
,
lgcp.estK
,
cauchy.estK
,
vargamma.estK
,
thomas.estpcf
,
matclust.estpcf
,
lgcp.estpcf
,
cauchy.estpcf
,
vargamma.estpcf
,
Summary statistics:
Kest
,
Kinhom
,
pcf
,
pcfinhom
.
See also ppm
# method for point patterns
kppm(redwood, ~1, "Thomas")
# method for formulas
kppm(redwood ~ 1, "Thomas")
kppm(redwood ~ 1, "Thomas", method="c")
kppm(redwood ~ 1, "Thomas", method="p")
kppm(redwood ~ x, "MatClust")
kppm(redwood ~ x, "MatClust", statistic="pcf", statargs=list(stoyan=0.2))
kppm(redwood ~ x, cluster="Cauchy", statistic="K")
kppm(redwood, cluster="VarGamma", nu = 0.5, statistic="pcf")
# LGCP models
kppm(redwood ~ 1, "LGCP", statistic="pcf")
if(require("RandomFields")) {
kppm(redwood ~ x, "LGCP", statistic="pcf",
model="matern", nu=0.3,
control=list(maxit=10))
}
# fit intensity with quasi-likelihood method
kppm(redwood ~ x, "Thomas", improve.type = "quasi")
Run the code above in your browser using DataLab