logLik.mppm | R Documentation |
For a point process model that has been fitted to multiple point patterns, these functions extract the log likelihood and AIC, or analogous quantities based on the pseudolikelihood.
## S3 method for class 'mppm'
logLik(object, ..., warn=TRUE)
## S3 method for class 'mppm'
AIC(object, ..., k=2, takeuchi=TRUE)
## S3 method for class 'mppm'
extractAIC(fit, scale = 0, k = 2, ..., takeuchi = TRUE)
## S3 method for class 'mppm'
nobs(object, ...)
## S3 method for class 'mppm'
getCall(x, ...)
## S3 method for class 'mppm'
terms(x, ...)
object , fit , x |
Fitted point process model (fitted to multiple point
patterns). An object of class |
... |
Ignored. |
warn |
If |
scale |
Ignored. |
k |
Numeric value specifying the weight of the equivalent degrees of freedom in the AIC. See Details. |
takeuchi |
Logical value specifying whether to use the Takeuchi penalty
( |
These functions are methods for the generic commands
logLik
,
AIC
,
extractAIC
,
terms
and
getCall
for the class "mppm"
.
An object of class "mppm"
represents a fitted
Poisson or Gibbs point process model fitted to several point patterns.
It is obtained from the model-fitting function mppm
.
The method logLik.mppm
extracts the
maximised value of the log likelihood for the fitted model
(as approximated by quadrature using the Berman-Turner approximation).
If object
is not a Poisson process, the maximised log
pseudolikelihood is returned, with a warning.
The Akaike Information Criterion AIC for a fitted model is defined as
AIC = -2 \log(L) + k \times \mbox{penalty}
where L
is the maximised likelihood of the fitted model,
and \mbox{penalty}
is a penalty for model complexity,
usually equal to the effective degrees of freedom of the model.
The method extractAIC.mppm
returns the analogous quantity
AIC*
in which L
is replaced by L*
,
the quadrature approximation
to the likelihood (if fit
is a Poisson model)
or the pseudolikelihood (if fit
is a Gibbs model).
The \mbox{penalty}
term is calculated
as follows. If takeuchi=FALSE
then \mbox{penalty}
is
the number of fitted parameters. If takeuchi=TRUE
then
\mbox{penalty} = \mbox{trace}(J H^{-1})
where J
and H
are the estimated variance and hessian,
respectively, of the composite score.
These two choices are equivalent for a Poisson process.
The method nobs.mppm
returns the total number of points
in the original data point patterns to which the model was fitted.
The method getCall.mppm
extracts the original call to
mppm
which caused the model to be fitted.
The method terms.mppm
extracts the covariate terms in the
model formula as a terms
object. Note that these terms do not
include the interaction component of the model.
The R function step
uses these methods.
See the help files for the corresponding generic functions.
Adrian Baddeley, Ida-Maria Sintorn and Leanne Bischoff. Implemented by \spatstatAuthors.
mppm
fit <- mppm(Bugs ~ x, hyperframe(Bugs=waterstriders))
logLik(fit)
AIC(fit)
nobs(fit)
getCall(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.